1

I wish to call another shell script tm.sh within AWK. I'm trying as below but its not working as no error during executing this command but output doesn't display that I coded into tm.sh. please help me.

bdf | awk '{if($5>90 && $6=="/u05") {(exec "/u05/bkpscript/tm.sh") }}'
0

1 Answer 1

2

Use system() function:

awk '{printf("%s ",$1); system("d2h " $2)}' file
2
  • i am not able to call another script from system() command. Aug 2, 2017 at 9:07
  • @Jhonsamuel in that case, there's either something wrong with your input data (no lines match the 2 conditions you set) or something wrong with your script. We can't help you if you don't show your data and the script.
    – terdon
    Aug 2, 2017 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .