Hi all
Can we integrates a AWK script in a KSH script?
How do we make?
#! /bin/ksh
...
list_media()
{
for MediaNr in $(vmquery -a | grep "media" |awk 'BEGIN{FS=": "};{print $NF}')
do
# here is the problem !!!
awk 'BEGIN { FS=": " }
{
$1 ~ /mount/ {print $NF} >$FirstMount
}
END { echo $FirstMount }'$MediaNr
done
}
...
The structure is : awk 'BEGIN {parameters} {program}' but how to integrate this?
Thanks for your help
nmn
Can we integrates a AWK script in a KSH script?
How do we make?
#! /bin/ksh
...
list_media()
{
for MediaNr in $(vmquery -a | grep "media" |awk 'BEGIN{FS=": "};{print $NF}')
do
# here is the problem !!!
awk 'BEGIN { FS=": " }
{
$1 ~ /mount/ {print $NF} >$FirstMount
}
END { echo $FirstMount }'$MediaNr
done
}
...
The structure is : awk 'BEGIN {parameters} {program}' but how to integrate this?
Thanks for your help
nmn