Tried the solution which you suggested
Code :
var1=1a
var2=2b
var3=3c
out='mktemp -p /scratch/ccg-ngs/tmp/vishal/tmp/ ${var1}XXXX || exit1'
cat_out='mktemp -p /scratch/ccg-ngs/tmp/vishal/tmp/ ${var2)XXXX || exit1'
cat_out1='mktemp -p /scratch/ccg-ngs/tmp/vishal/tmp/ ${var3}XXXX || exit1'
cat_outfinal=$coutfinal
and then:
Code :
awk '{print FNR "\t"$4"\t"$5"\t"$9"\t"$2"\t"$3}' $inp > $out
cat $out | tr "-" " " > $cat_out
cat $cat_out | tr " " "\t" > $cat_out1
awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7}' $cat_out1 > $cat_outfinal
But it throws these kind of errors
Code :
/var/spool/torque/mom_priv/jobs/1109180.SC: line 32: $out: ambiguous redirect
cat: invalid option -- p
Try `cat --help' for more information.
/var/spool/torque/mom_priv/jobs/1109180.SC: line 33: $cat_out: ambiguous redirect
/var/spool/torque/mom_priv/jobs/1109180.SC: line 34: $cat_out1: ambiguous redirect
cat: invalid option -- p
Try `cat --help' for more information.
awk: cmd. line:1: fatal: cannot open file `mktemp' for reading (No such file or directory)
---------- Post updated at 01:23 AM ---------- Previous update was at 01:21 AM ----------
used without || exit1 as well
---------- Post updated at 01:33 AM ---------- Previous update was at 01:23 AM ----------
HI Chubler_XL
Thanks a lot for your help. Great. I wanted something like that.
New to scripting so don't have any idea to use pipe proprtly. I must learn it.
Thanks a lot again for the help.
Wonderful