bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

for loop in makefile


From: Ed Wong
Subject: for loop in makefile
Date: 10 Jul 2002 13:57:05 -0700

I need to have a simple loop in makefile to unzip and rename all the
nc*.gz files in current directory.  The following is how I do it in
shell script and I need to put it in makefile.  Anyone know how to do
it?  Thanks in advance.

for file in `ls nc*.gz`
do
        base=`echo $file | awk -F. '{ print $1 }'`
        $unzip $file
        mv -f $base $base.txt
done

ewong



reply via email to

[Prev in Thread] Current Thread [Next in Thread]