Getting first line argument in bash after forking processes -
here file.sh bash script:
#!/bin/bash $(awk '/[ \t]+'$1'\/'$2'/' /etc/servicies) | awk '{print '$1'}';
if run:
file.sh 21 tcp
it should print ftp. error:
./file.sh: line 2: ftp: command not found
can explain me little bit why error , how fix it?
thanks.
awk '/[ \t]+'$1'\/'$2'/ { print $1 }' /etc/services
Comments
Post a Comment