Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-09-2012, 12:14 PM   #16
Registered: Jun 2012
Location: Porto Alegre-Brazil
Distribution: Slackware- 14, Debian Wheezy, Ubuntu Studio, Tails
Posts: 88

Rep: Reputation: 6


I think it works:

f1="london 1 1"                                                                                                                                                                    
while read line                                                                                           
    echo  "$f1"    >> "S$a"                                                                                                                                                                                         
    echo   "$line" >> "S$a"                                                                                     
done < f2
1 members found this post helpful.
Old 07-09-2012, 12:54 PM   #17
LQ Newbie
Registered: May 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Yes it does work, I checked it again. Thanks all
Old 07-09-2012, 02:15 PM   #18
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220Reputation: 1220
Have another look at my code and try to spot the difference
Old 07-09-2012, 02:42 PM   #19
LQ Newbie
Registered: May 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Just a slight difference between your code and Alchemikos. But it is essentially your code. I used the two and both worked for me. The fault was from me. Thanks again. The best


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check missing header files included from another header file adisan82 Linux - Software 1 01-28-2011 03:57 AM
[exim4] Remove header lines matching received client ip konddor Debian 1 10-23-2009 03:25 AM
Count commas in header and append as many missing from the lines underneath tribal_molecule Programming 1 08-12-2009 06:05 AM
Need help appending text to lines in a file using vi editor tmbrwolf53 Linux - Newbie 3 10-31-2008 03:25 PM
Appending ends of lines in sed Agentrooker Programming 8 08-07-2008 11:19 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration