Shell Programming, newbie
Hello,
i'm completely new to linux and shell programing
i'm using linux fedora v.8, bash
i want to know how to print argument value depending on other argumet value.
ex. i have two txt files
the first one includes 2 arguments $1, $2 (these values r entered through program)
the second one includes 2 arguments $3, $2 (these values r entered through program)
now through shell program the user will enter $3 value, so i want through this value to print $1 value, any help?
- then i want to know how to consider each word that entered by user as an argument and how to print the third word (as an ex.)
ex. the user will enter this line;
test test1 test2 test3 test4 ....
so how to print the third word?
i hope that my questions are clear
thanks in advance
|