The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-20-2008
Jack79_mi Jack79_mi is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 2
SED - Help

Hello,

I need an help for a shellscript.

I have a process that create an output file with a list of names, and it create an output file ( everytime the list of names can change ), this is the output file let's call names.txt:


prgrm> list nametable show NAMES

NAMES
-------------------------------
JOHN
MARK
ANTHONY
GEORGE

4 row returned.

prgrm> spool off



I want to use SED or ( something else would be nice and appreciated as well ) for creating a second file named names2.txt with this content:

JOHN
MARK
ANTHONY
GEORGE


This was an example... and everytime the name list may vary....
Can you help me ? My brain is smoking for thinking about a solution

Many Thanks
Jack79_mi
  #2 (permalink)  
Old 11-20-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,643
You are spooling the file - can you not get a copy for your own use?
  #3 (permalink)  
Old 11-20-2008
Jack79_mi Jack79_mi is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 2
Hi Jim,

yes I am building a big shellscript that run other processes, unofrtunaely the program I am using spool files in that format... that's why I need to edit the output and reusing it for other purposes.....

Thanks
  #4 (permalink)  
Old 11-21-2008
sharadpisal sharadpisal is offline
Registered User
  
 

Join Date: May 2008
Posts: 28
I think, no header and no summary/feedback can help you,
I don't remember exactly but i was running in same problem almost a year back and it was solved using the way i just told you
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0