Name: vande Date: April 9, 2008 at 07:46:58 Pacific Subject: Unix scripting question OS: Unix CPU/Ram: idk :) Model/Manufacturer: :)?
Comment:
ok so im gonna paste some code can some one explain one thing to me. And that is where fld1 ,2 ,3 filemonth fld 5 etc come from its reading these folder/ files but........... # File cleanup if [ -e ftemp1$$ ] then cat ftemp1$$ | while read fld1 fld2 fld3 filemonth fld5 fileyear filename fld99 do echo "$filemonth$fileyear $filename" | grep -v ${month[0]} | grep -v ${month[1]} | grep -v ${month[2]} | grep -v ${month[3]} | grep -v ${month[4]} | grep -v ${month[5]} | grep -v ${month[6]} | grep -v ${month[7]} | grep -v ${month[8]} | grep -v ${month[9]} | grep -v ${month[10]}| grep -v ${month[11]} | grep -v ${month[12]} >> ftemp2$$ done
cat ftemp2$$ | while read fld1 filename do rm 2>/dev/null $filename ls -l 2>/dev/null $filename >> $outfile done fi
there is more to the code and ftemp1$$ exist everything works im just trying to understand a part of this code ...... and there is no where else where these folders/files its reading are created nor are they in the directory this script is ran from they dont exist how can you read on something that isn't there? well miswell not say that cause the script works so they must be logically created some how
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE