Re: Pb de > et echo en shell
'ello Debian
On Thu, May 10, 2001 at 09:31:42AM +0200, Stephane Leclerc wrote:
> df > toto.txt
^^^^^^^^^^^^^
La réponse.
> Par contre si dans un script, je fais un echo `df` > toto.txt,
> j'obtiens :
> J'aimerais bien conserver la mise en page pour une question de lisibilité.
> Y-a-t-il une façon de faire ?
Euh, oui. Enlever les `
[huggie@woody ~]$ cat >foo.sh
#!/bin/sh
df >toto.txt
[huggie@woody ~]$ chmod 755 foo.sh
[huggie@woody ~]$ ./foo.sh
[huggie@woody ~]$ cat toto.txt
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda5 139986 25917 106842 20% /
...
Je ne vois pas le problème.
--
----------( "I've paid my $29.95...I think I'm entitled to )----------
----------( a few more answers." - FM )----------
Simon ----( )---- Nomis
Htag.pl 0.0.17
Reply to: