Hi!
I'm writing a large script that converts textfiles to html. The problem is that the script is supposed to check if there are textfiles to be converted on several computers. The computers names are stored in an environmental variable, like:
COMPS_TO_CHECK="comp1 comp2 comp3 ..."
In a shellscript (ksh) I would use something like:
for c in COMPS_TO_CHECK
do
--check for files---
done
but can I do this in awk? A friend of mine suggested that I might be able to pipe the variable into the script and then use that certain field, but I'm already pipeing quite a lot of data into awk so I think that it could get quite messy...
Does anyone have an idea about how to accomplish this?
Would it be easier to put the names of the computers in a text file and read them line by line?
Has anyone understood what I'm talking about?
I'm not sure myself... ;-)
Thanks in advance
/Tobbe
I'm writing a large script that converts textfiles to html. The problem is that the script is supposed to check if there are textfiles to be converted on several computers. The computers names are stored in an environmental variable, like:
COMPS_TO_CHECK="comp1 comp2 comp3 ..."
In a shellscript (ksh) I would use something like:
for c in COMPS_TO_CHECK
do
--check for files---
done
but can I do this in awk? A friend of mine suggested that I might be able to pipe the variable into the script and then use that certain field, but I'm already pipeing quite a lot of data into awk so I think that it could get quite messy...
Does anyone have an idea about how to accomplish this?
Would it be easier to put the names of the computers in a text file and read them line by line?
Has anyone understood what I'm talking about?
I'm not sure myself... ;-)
Thanks in advance
/Tobbe