[lug] help! shell script

Rich Deeming rdeeming at mcdata.com
Tue Jan 11 09:10:16 MST 2000


Legin,

Don't use the (') around the file selection.
ie. for a in *.tar.gz

Rich
rdeeming at sanshark.com


legin wrote:

> hi friends,
>
>         I was writing a shell script to uncompress all the files in the
> directory.
>
>         The shell script available below just uncompressed one file.
>
>         The funny thing was that when i did a gzip using this shell
> script it compressed
>
>         all the files....Can any one help
>
> ------------------------------------------------------------
> #!/bin/bash
> for a in '*.tar.gz'
> do
>         tar zvxf $a
> done
> -------------------------------------------------------------
>
> Thanks,
> legin
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug






More information about the LUG mailing list