|
Hello Franklin / Unix gurus,
My script is as follows:
#!/bin/ksh
sys=/export/home/vinay/Number.data
mod1=AAA
mod2=BBB
grep -h 'AAA' $sys > /export/home/vinay/AAA_$mod1.data
grep -h 'BBB' $sys > /export/home/vinay/BBB_$mod2.data
But I am not happy with the script since it has to traverse twice imto the Number.dat file
Also I some questions,
I want the process to use the Number.dat once rather than traversing twice.
Also, say if memory is full while script is running, then how should I handle it.
Kindly reply back if any one has a suggestion/script/solution
Thanks in advance.
Regards,
Vinay
Last edited by Vinaykumar1; 05-13-2008 at 10:18 PM.
|