Register
It is currently Fri Oct 31, 2014 11:11 am

pass a variable to a text file


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sun Feb 18, 2007 2:13 pm   

Joined: Sun Dec 03, 2006 6:06 pm
Posts: 10
Hi, i need some help to a simple task.
i'm newbie :-(

i've a script like this :

echo "read insert"
read coords_thre
echo '
LX=load("$coords_thre");
' > Octave_temp.m
octave Octave_temp.m

when the echo ask me to a "read insert"
i type in my shell :

/Users/home/folder/filename

my targhet is to have as result, a file named : Octave_temp.m

in it i must have a simple line like :

LX=load('/Users/home/folder/filename');

my script is wrong, it give me a line like this :

LX=load("$coords_thre");

instead of the right results:
LX=load('/Users/home/folder/filename');

thanks for any suggestion !


Top
 Profile  
 PostPosted: Sun Feb 18, 2007 2:43 pm   

Joined: Sun Dec 03, 2006 6:06 pm
Posts: 10
hi,
i fix my issue using :

echo "read insert"
read coords_thre
echo "
LX=load('${coords_thre}');
" > Octave_temp.m
octave Octave_temp.m

:-)


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: Exabot [Bot], Google [Bot] and 22 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:  


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