I want to pass the argument in the console while running a script called run.sh as follows
run.sh first count
for example:
./run.sh first 10
i have to pass those first and 10 to the script here
cat file1.txt | head -10
here first should refer to head and count value should be 10. how can i do this?


cat file1.txt | head $1.$1refers to the first parameter,$2to the second, etc.firstas an argument, but then don't seem to use it in the script. Did you mean to passfile1.txtas the argument — or to usefirstin place offile1.txtin the command? Also, beware of the impending UUOC Award.