The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-29-2008
chella chella is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 75
Hi,

Without using any loops you can get the same output. Just give a try on it.


Code:
yes "hello world" | head -50| grep -n "hello world" | awk -F: '{print $2" "$1}'

Regards,
Chella