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 two files rameshonline Shell Programming and Scripting 14 04-06-2009 02:20 AM
merging text files code19 Shell Programming and Scripting 8 02-13-2008 08:13 AM
merging of 2 files AWK - part 2 pp56825 Shell Programming and Scripting 2 02-11-2008 10:14 PM
Merging two files venommaker UNIX for Dummies Questions & Answers 4 01-10-2008 08:15 AM
Merging fileds from 2 files Mudshark Shell Programming and Scripting 8 04-19-2005 02:49 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-30-2006
fiol73 fiol73 is offline
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.
  #2 (permalink)  
Old 01-01-2007
Andrek Andrek is offline
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
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 11:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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