echo
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > echo




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    echo  
James


Report This Message To A Moderator Edit/Delete Message


 
09-21-05 12:49 PM

echo "$foo $abc" > $FILE

Why doest this write to the screen and not to file and how could I fix it







[ Post a follow-up to this message ]



    Re: echo  
Nils O. Selåsdal


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-21-05 12:49 PM

James wrote:
> echo "$foo $abc" > $FILE
>
> Why doest this write to the screen and not to file and how could I fix it
It does here.
Tell us a bit about which OS and shell you are using,
along with what you put in your FILE,foo and abc variables.





[ Post a follow-up to this message ]



    Re: echo  
James


Report This Message To A Moderator Edit/Delete Message


 
09-21-05 12:49 PM

bourne
foo is full filename ie /ect/passwd
abc is a number
os is SunOS
"Nils O. Selåsdal" <NOS@Utel.no> wrote in message
news:433134cc$1@news.broadpark.no...
> James wrote: 
it[vbcol=seagreen]
> It does here.
> Tell us a bit about which OS and shell you are using,
> along with what you put in your FILE,foo and abc variables.







[ Post a follow-up to this message ]



    Re: echo  
#2pencil


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-21-05 10:54 PM

What does it return if you don't use the variables & use real data?

-#2pencil-






[ Post a follow-up to this message ]



    Re: echo  
Eric Enright


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-21-05 10:54 PM

James wrote:
> bourne
> foo is full filename ie /ect/passwd
> abc is a number
> os is SunOS

eric@lw:~ (1)> exec /bin/sh
$ foo="/etc/passwd"
$ abc="10"
$ FILE="/home/eric/bar"
$ echo "$foo $abc" > $FILE
$ cat /home/eric/bar
/etc/passwd 10
$ uname -a
SunOS lw 5.11 snv_18 i86pc i386 i86pc

Works fine here.  Could you post the exact commands/variables
you are trying?

Eric

> "Nils O. Selåsdal" <NOS@Utel.no> wrote in message
> news:433134cc$1@news.broadpark.no... 
> it 
>
>





[ Post a follow-up to this message ]



    Re: echo  
Chuck Dillon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-05 02:01 AM

James wrote:
> echo "$foo $abc" > $FILE
>
> Why doest this write to the screen and not to file and how could I fix it
>
>

What's in $FILE?  Perhaps it needs to be quoted.  Also what does "which
echo" say?  Anything unexpected?

-- ced

--
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:23 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register