find cmd inside nested for loop to explore varying keyword combination
I have a database where I wanted to generate a table of filecount using the combination of the rowKeyword and colKeyword.
Code:
#!/bin/bash PHP Code:
PHP Code:
OR at least as my failed attempts were trying to get PHP Code:
|
echo has a -n flag, probably missed.
|
additionally one needs to suppress newline character introduced by "wc -l" using "xarg echo -n"
Thanks pan64. With echo -n I could get the second way of printing out the result.
With some modification in original code I tried to print tabulated output (first one intended display in first post). It was not successful as the find * * * * | wc- l command output introduces a trailing newline. Following remedy using "xargs" and "echo" helped to suppress newline comment introduced by the wc-l cmd output: Code:
find "$imgRootPath" -type f -iname "*.bmp" -name "*_${sCode}_*" -name "*_${cCode}_*" | wc -l | xargs echo -n " " Thanks again |
All times are GMT -5. The time now is 02:06 AM. |