shell: positional parameters...
Hi
I need to display the sequential number of a word in a file.
Example
# cat test_file
orange Gremio Linux Gates Brazil
#
In this case, Orange is 1, Gremio is 2, Linux 3 etc....
other file...
# cat test_file2
Gremio Samba Bush orange Brazil
#
Now Gremio is 1, Samba is 2, Bush is 3 etc...
I'm trying to read a line, set the first word after other specific word like an argument.
In examples above, Gremio is the specific word.
In first file the word "Linux" is parameter;
In the second the word "Samba" is parameters;
tanks for any kind of help...
|