[Ilugc] I wanna read a text files values into a variable

  • From: smohan@xxxxxxxxxxxxxxxxx (S Mohan)
  • Date: Tue, 9 Jul 2002 14:21:26 +0530

Cat <filename>|cut -d: -f4 -f2

This will give the 4th and the 2nd fields. Let me know if you have any
problems.

Mohan

-----Original Message-----
From: ilugc-admin@xxxxxxxxxxxxxxxxxx
[mailto:ilugc-admin@xxxxxxxxxxxxxxxxxx] On Behalf Of Bharathi S
Sent: 09 July, 2002 1:08 PM
To: Aman
Cc: ilugc@xxxxxxxxxxxxxxxxxx
Subject: Re: [Ilugc] I wanna read a text files values into a variable


On Tue, 9 Jul 2002, Aman wrote:

The text file contains few entries that are
seperated by : (colons).

Try  CUT command
-d or --delimiter=DELIM
   use DELIM instead of TAB for field delimiter.

HTH :)
-- 
--==| Bharathi S | BSB-364 DONLab | IIT-Madras |==--
"Such we are such they are;"
Ev'n this boast will friendship mar.
*In Tirukkural of Holy Tamil poet Tiruvalluvar.

_______________________________________________
Ilugc mailing list
Ilugc@xxxxxxxxxxxxxxxxxx
http://www.aero.iitm.ernet.in/mailman/listinfo/ilugc


Other related posts: