how to join this 2 script together
for dir in $1; do
echo $dir: $(ls "$dir" | wc -l) done awk '{for (i=1;i<=NF;i++){printf $i };printf "\n"}' < $2 | sort -n | tail -n1 |
How are they related? I see no natural join between the 2 snippets.
Also, please use [code][/code] tags when displaying code. |
It first prints out the directory name and the total files that directory has.
like directory 1 has 25 files. it will print 1 : 25. i wanna use that output and find the directory with max files in it. |
So what has that got to do with the awk script? Also, it would appear this is a copy of a previous question you asked on how to find this information. Any reason why you have asked the same question again?
|
I thought this would be easy. Sorry about that.
|
It is not so much that it is difficult, but more that it is very unclear what you are trying to achieve?
I mean to combine them I could have simply said: Code:
for dir in $1; do |
All times are GMT -5. The time now is 02:28 AM. |