|
|
|
| echo "$foo $abc" > $FILE
Why doest this write to the screen and not to file and how could I fix it
| |
| Nils O. Selåsdal 2005-09-21, 7:57 am |
| 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.
| |
|
| 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[color=darkred]
> 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.
| |
| #2pencil 2005-09-21, 6:59 pm |
| What does it return if you don't use the variables & use real data?
-#2pencil-
| |
| Eric Enright 2005-09-21, 6:59 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
>
>
| |
| Chuck Dillon 2005-09-22, 6:58 pm |
| 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.
|
|
|
|