hi all,
I run a query against database. The output is line this:
Employee name
-------------
andy
lee
love
Found 3 names.
How do I go about getting just the first entry - "andy". I try to use sed s/data// and exclude the rest and pipe to temp file. But the output is not right as from the above example you have about 7 lines. Since I just need "andy" so line 1-2 is empty line 3 is andy and the rest is empty line. What I need is andy on the first line in temp file. My script went bizarre if cat for empty line and compare to a data. Anybody could help me, please?
Thank you in advance.
regards,
feroz
I run a query against database. The output is line this:
Employee name
-------------
andy
lee
love
Found 3 names.
How do I go about getting just the first entry - "andy". I try to use sed s/data// and exclude the rest and pipe to temp file. But the output is not right as from the above example you have about 7 lines. Since I just need "andy" so line 1-2 is empty line 3 is andy and the rest is empty line. What I need is andy on the first line in temp file. My script went bizarre if cat for empty line and compare to a data. Anybody could help me, please?
Thank you in advance.
regards,
feroz