From a Korn Shell script, I am working on reading a file, based on a grep or awk command for a specific string, and can't figure out a way to return the line number where the string is found in the file. I think I could do this with a counter and variable but this would create a lot of extra coding, so I wondered if there is a system-KORN way to do it. I'm also in an AIX enviroment if that helps. $LINENO only seems to work in the executing script, not in the read file.
Any help would be great!
Thanks
Any help would be great!
Thanks