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

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -