The UNIX and Linux Forums  


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.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search for string in a file and extract another string to a variable daikeyang Shell Programming and Scripting 6 03-20-2009 08:45 PM
Extract Variable and Append it to the file shekharaj Shell Programming and Scripting 1 12-30-2008 02:43 PM
bash and ksh: variable lost in loop in bash? estienne Shell Programming and Scripting 2 08-25-2008 03:09 PM
passing variable from bash to perl from bash script arsidh Shell Programming and Scripting 10 06-04-2008 01:25 PM
how to extract paragraphs from file in BASH script followed by prefix ! , !! and !!! nabmufti Shell Programming and Scripting 6 02-09-2008 08:32 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-23-2009
patrykxes patrykxes is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 23
bash, extract value from the file to the variable

Hi
I've got phrases (string) in phrases.txt file and I've got script.sh.

How can I draw out the first line from phrases.txt, save it in variable PHRASE and perform the content of script.sh, and then draw out the second line from phrases.txt, save it in the same variable PHRASE and perform the content of script.sh, and so on... ?

At the moment variable PHRASE is contained in script.sh

At the moment when there is one phrase in one line in phrases.txt it works without problems, the trouble starts when there is more than one phrase in phrases.txt

Best Regards
 

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 12:50 PM.


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