Hi,
In a script i am trying to run a SQL by connecting Sybase DB.
While executing the script I am getting the output with the header. means:
Employee_Name--------------------------- Anup Das
I need the Output:
Anup Das
Kindly advice.
Hi,
In a script i am trying to run a SQL by connecting Sybase DB.
While executing the script I am getting the output with the header. means:
Employee_Name--------------------------- Anup Das
I need the Output:
Anup Das
Kindly advice.
awk '{print $(NF-1),$NF}'
If the employee name comprises of more than two words, then this script won't return the full name!
A better idea might be something like this -
$
$ echo "Employee_Name--------------------------- Gael Garcia Bernal" | awk '{sub(/^.*-+ /,""); print}'
Gael Garcia Bernal
$
$
$ echo "Employee_Name--------------------------- Henri de Toulouse-Lautrec" | awk '{sub(/^.*-+ /,""); print}'
Henri de Toulouse-Lautrec
$
$
tyler_durden