The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
merging text files code19 Shell Programming and Scripting 8 02-13-2008 05:13 AM
merging of 2 files AWK - part 2 pp56825 Shell Programming and Scripting 2 02-11-2008 07:14 PM
Merging two files venommaker UNIX for Dummies Questions & Answers 4 01-10-2008 05:15 AM
Merging fileds from 2 files Mudshark Shell Programming and Scripting 8 04-19-2005 10:49 AM
merging two files rameshonline Shell Programming and Scripting 13 06-29-2004 03:06 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-30-2006
Banned
 

Join Date: Oct 2006
Posts: 10
merging INPUT and files

guys i'm stille working on my little programme and i have not solved my problem:

i want to emulate the behaviour of the command

paste - file

which takes input from the user and from a specified file/s and merges together the typing and the content of the file/s one line at the time.

how could I say: "take one line from input and first line from file, then again input and second line of the file till the end of the file and then exit"?

suggestions? thanx.
Reply With Quote
Forum Sponsor
  #2  
Old 01-01-2007
Registered User
 

Join Date: Aug 2006
Posts: 122
try this....

for next in `cat /path/to/file`
do
echo "User input..."
read user
echo "$next $user"
done
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0