[linux-l] shell skript probleme mit leerzeichen
Benjamin Schieder
blindcoder at scavenger.homeip.net
Do Okt 27 15:55:05 CEST 2005
On Thu, Oct 27, 2005 at 03:48:13PM +0200, Nico Golde wrote:
> Hallo Benjamin,
> * Benjamin Schieder <blindcoder at scavenger.homeip.net> [2005-10-27 15:36]:
> > On Thu, Oct 27, 2005 at 03:07:37PM +0200, willek wrote:
> [...]
> > > $ sh verkleinere png
> > ehm... was nu. /bin/bash oder sh?
>
> Bei den meisten Distributionen ist das ein symlink, von
> daher egal.
Nicht egal:
blindcoder at ceres:~/tmp$ bash test.sh
test.sh
blindcoder at ceres:~/tmp$ sh test.sh
test.sh: line 5: syntax error near unexpected token `<'
test.sh: line 5: `done < <( ls )'
blindcoder at ceres:~/tmp$ ls -l /bin/bash /bin/sh
lrwxrwxrwx 1 root root 5 Jan 25 2005 /bin/bash -> bash2
lrwxrwxrwx 1 root root 5 Jan 25 2005 /bin/sh -> bash2
blindcoder at ceres:~/tmp$ cat test.sh
#!/bin/bash
while read x ; do
echo $x
done < <( ls )
Gruesse,
Benjamin
--
#!/bin/sh #!/bin/bash #!/bin/tcsh #!/bin/csh #!/bin/kiss #!/bin/ksh
#!/bin/pdksh #!/usr/bin/perl #!/usr/bin/python #!/bin/zsh #!/bin/ash
Feel at home? Got some of them? Want to show some magic?
http://shellscripts.org
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 189 bytes
Beschreibung: nicht verfügbar
URL : <https://mlists.in-berlin.de/pipermail/linux-l-mlists.in-berlin.de/attachments/20051027/3f40e57c/attachment.sig>
Mehr Informationen über die Mailingliste linux-l