I need to modify a file and rename it. Tried:
awk -f modfile oldname new=newfile.fmt
(Tried also: awk -f modfile oldname new="newfile.fmt")
and modfile has lines such as
{print " mod1 " > new}
{print " mod2 " > new}
The modfile works if I change the lines to read:
{print " mod1 " > "newfile.fmt"}
{print " mod2 " > "newfile.fmt"}
rather then passing it from the command line
Thanks
awk -f modfile oldname new=newfile.fmt
(Tried also: awk -f modfile oldname new="newfile.fmt")
and modfile has lines such as
{print " mod1 " > new}
{print " mod2 " > new}
The modfile works if I change the lines to read:
{print " mod1 " > "newfile.fmt"}
{print " mod2 " > "newfile.fmt"}
rather then passing it from the command line
Thanks