Computing.Net > Forums > Programming > splite lines

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

splite lines

Reply to Message Icon

Name: ssmraju
Date: April 27, 2009 at 00:25:15 Pacific
OS: UNIX
Subcategory: C/C++
Comment:

I want to split words from the line.
(filename,10) REC [1234,ww] [2345,ee] [56757,hh]

i have to get word between '[' and ']'. how can i do this using shell scripting in bash



Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: April 27, 2009 at 02:00:16 Pacific
Reply:

 echo "(filename,10) REC [1234,ww] [2345,ee] [56757,hh]" | perl -ne 'print m/\[(.*?)\]/g'

Unix Win32 tools | Gawk for Windows


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: splite lines

Batchproblem; get 2 lines in 1? www.computing.net/answers/programming/batchproblem-get-2-lines-in-1-/13525.html

Script to remove lines from a file www.computing.net/answers/programming/script-to-remove-lines-from-a-file/7090.html

bresenham line drawing algorithm www.computing.net/answers/programming/bresenham-line-drawing-algorithm/5068.html