bash query

User Iam vramnum10 at gmail.com
Mon Jun 11 22:36:07 UTC 2007


On 6/11/07, dave selby <dave6502 at googlemail.com> wrote:
>
> Hi all,
>
> I have a bash script that scans a dir with ...
>
> for sourcedir in KDE/*
>
> this cycles through everything in KDE/ - however i need to skip
> certain file names. Anybody know how to implement this ? - my bash is
> somewhat rusty :)
>
> Cheers
>
> dave



Is this kinda what you want

@@@@@@@@@@@@@@@@
#! /bin/bash

for i in $( ls /etc   | grep ^z -v );   # everything but  stuff with z
do
                 echo file: $i
done


@@@@@@@@@@@@@@@@@@@@@

I used grep as a fitler to rid everything I didn't want...
<in this case z>
HTH

Lamsok





--
>
> The unavoidable price of reliability is simplicity.
>
> -- C.A.R. Hoare
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070611/82838f3d/attachment.html>


More information about the ubuntu-users mailing list