The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
reading lines
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
reading lines
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
05-17-2008
jaduks
Registered User
Join Date: Aug 2007
Location: Assam,India
Posts: 141
Era's solution helped me to find two more similar ways . Thank you Era.
Code:
$ sed -n '3 s/\(.\{3\}\).*/\1/p' test.txt thr $ awk 'NR==3 {print substr($0,1,3)}' test.txt thr
//Jadu
jaduks
View Public Profile
Visit jaduks's homepage!
Find all posts by jaduks