nickflind
January 23rd, 2008, 07:15 AM
I have a question concerning the following code I have written:
tqladmin -info commands returns a list that I store in the myScript file.
Then I start processing this list but I keep creating new files in order to do so, myScript.tmp, myScript1.tmp etc...
Is there any way I can avoid creating new files and work with variables?
tqladmin -info > ~/myScript.tmp
cat ~/myScript.tmp | sed '1,2d' > ~/myScript1.tmp
awk '{ if (($2 != "LOADER") && ($2 != "ALARMER") && ($2 != "DBA") && ($2 != "LAUNCHER")) print}' ~/myScript1.tmp > ~/myScript2.tmp
tqladmin -info commands returns a list that I store in the myScript file.
Then I start processing this list but I keep creating new files in order to do so, myScript.tmp, myScript1.tmp etc...
Is there any way I can avoid creating new files and work with variables?
tqladmin -info > ~/myScript.tmp
cat ~/myScript.tmp | sed '1,2d' > ~/myScript1.tmp
awk '{ if (($2 != "LOADER") && ($2 != "ALARMER") && ($2 != "DBA") && ($2 != "LAUNCHER")) print}' ~/myScript1.tmp > ~/myScript2.tmp