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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -