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 am trying to a different number of parameter to a script and check them but I don't know where did I go wrong?.
I wrote the following script
test.sh
#!/bin/sh
count=$#
i=1
while [ $i -le $count ]; do
echo "parameter " $i " is " ${i}
i=`expr $i + 1`
done...
I am very new to unix, I need to navigate to different directories and concatenate the files to one file, then compress the file and archive to another directory.
I was thinking of using cat, gzip and mv commands. Please can some one give me bit of help.
Thanks in advance
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.