Register
It is currently Thu Jul 24, 2014 2:25 am

Sed not removing the last line of a output file


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sat Aug 17, 2013 1:03 pm   

Joined: Fri Jul 19, 2013 5:17 pm
Posts: 10
Here is the out put:

1.stock symbol
2. 14.01
3. 13.95
4. 14.35
5. 4.17
6. Beta 1.13

here is the sed command:

sed -e '6d' /home/user/Desktop/file8.txt > /home/user/Desktop/file9.txt

it should remove " Beta 1.13" but it doesn't, am I missing something


Top
 Profile  
 PostPosted: Sat Aug 17, 2013 1:50 pm   

Joined: Fri Jul 19, 2013 5:17 pm
Posts: 10
I figured it out, I went to SED One Liners :http://www.catonmat.net/blog/wp-content/uploads/2008/09/sed1line.txt
and found the simple answer was to use the sed delete last line command or sed -e '$d' Now it output's what I wanted.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP