Computing.Net > Forums > Unix > shell script /awk

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.

shell script /awk

Reply to Message Icon

Name: Mehul
Date: May 19, 2003 at 17:16:05 Pacific
OS: sun
CPU/Ram: sun
Comment:

Hi gurus ,

I need one help in shell script
i have a file which looks like this

subject: this is subject
comments:this is comment
Elements:
/vob/puma/dos/unix/abc/file.java@@main/ddd/0
/vob/puma/dos/file.java@@main/ddd/sss/1

many line after this

I need to collect the file name with the whole path in a seperate file
means i want
/vob/puma/dos/unix/abc/file.java
/vob/puma/dos/unix/abc/file.java

rest of all the other to be eliminated i can grep for .java but how to collect the path name also ?i donno

your help will be appreciated

Thx
Mehul



Sponsored Link
Ads by Google

Response Number 1
Name: Swapan Satpathi
Date: May 19, 2003 at 18:27:26 Pacific
Reply:

use the following command
cut -f1 -d'@'>out_file

thanks
Swapan


0

Response Number 2
Name: Mehul
Date: May 21, 2003 at 11:43:03 Pacific
Reply:

Thx for the reply but

How do i go to that particular lines or record and than use this cut command

there are many line in a file and i need only those line which have filenames with @@ this extended path name

Thx
Mehul


0

Sponsored Link
Ads by Google
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 Unix Forum Home


Sponsored links

Ads by Google


Results for: shell script /awk

Unix, Shell Script, awk & variables www.computing.net/answers/unix/unix-shell-script-awk-amp-variables/5148.html

Shell Script & Awk www.computing.net/answers/unix/shell-script-amp-awk/4594.html

awk in shell script www.computing.net/answers/unix/awk-in-shell-script/6200.html