May 11, 2003 #1 bhagabati Programmer Apr 8, 2003 8 AU I need to count files existing in my current directory with the file extention of *.log.* so that I can initialise using the loop like x=0 while [ $x -lt $num ] do > $(eval echo \$$i).log.$x x=`expr $x + 1` done How can I do it please give me a quick tips.
I need to count files existing in my current directory with the file extention of *.log.* so that I can initialise using the loop like x=0 while [ $x -lt $num ] do > $(eval echo \$$i).log.$x x=`expr $x + 1` done How can I do it please give me a quick tips.
May 11, 2003 1 #2 Salem Programmer Apr 29, 2003 2,455 GB x=`ls -1 *.log | wc -l` first option is "minus one" second option is "minus lower case L" Upvote 0 Downvote
x=`ls -1 *.log | wc -l` first option is "minus one" second option is "minus lower case L"
May 11, 2003 Thread starter #3 bhagabati Programmer Apr 8, 2003 8 AU Thanks Salem for your quick response. It works and solves my problem now. Upvote 0 Downvote