|
ssimple shell script to parse a file ~sed or awk
i have a file called myfile
A 1
B 2
C 3
i need to use sed or awk file take a variable (as a ext input), as a number & search each line for that number(pattern) & extracts the letter
for example, If I type 2, the result will be b
Caveat ~There is a TAB between the letters & numbers ~ not spaces, also there's no editng of myfile
whose good at scripting ?
|