1 |
On Fri, 15 Oct 2004 11:08:17 +0200 Christian <MainNewz@×××.net> wrote: |
2 |
> eine Frage hab ich allerdings noch.... |
3 |
> wieso funktioniert bei mir das shellscript-zeug nicht... |
4 |
> ich bekomm bei meinem beispielprogramm folgende ausgabe: |
5 |
> |
6 |
> ---PRG--- |
7 |
> #!/bin/bash |
8 |
> |
9 |
> for name in 'cut -d":" -f1 /etc/passwd' |
10 |
|
11 |
Das sollen Bakcticks sein und keine Apostrophe, also |
12 |
`cut -d":" -f1 /etc/passwd` oder $(cut -d":" -f1 /etc/passwd) |
13 |
|
14 |
> do |
15 |
> echo $name |
16 |
> done |
17 |
> ---PRG--- |
18 |
> |
19 |
> ---AUSGABE--- |
20 |
> # sh shelltest.sh |
21 |
> cut -d":" -f1 /etc/passwd |
22 |
> # |
23 |
> ---AUSGABE--- |
24 |
> |
25 |
> wieso schreibt er nicht die ganzen usernamen hin? irgend wie |
26 |
> funktioniert meine for-schleife nicht... |
27 |
|
28 |
|
29 |
Gruß, |
30 |
Renat |
31 |
|
32 |
-- |
33 |
gentoo-user-de@g.o mailing list |