[Tfug] Quick command line question...
brandon
brandons.daemon at gmail.com
Wed Mar 10 15:01:23 MST 2010
On Wed, Mar 10, 2010 at 2:30 PM, Jim March <1.jim.march at gmail.com> wrote:
> Concluding this (for now?) here's what actually worked:
>
> for i in *.adm; do sed 's/HandCountedPaperBallots/HCPB/g' $i>
> `basename $i`.TMP; done
> for i in *.TMP; do mv $i `basename $i .TMP`; done
>
> for i in *.adm; do sed 's/subvert DRE tabulation/subvert tabulation/g'
> $i> `basename $i`.TMP; done
> for i in *.TMP; do mv $i `basename $i .TMP`; done
>
> for i in *.adm; do sed 's/direct voter/direct voters/g' $i> `basename
> $i`.TMP; done
> for i in *.TMP; do mv $i `basename $i .TMP`; done
>
> for i in *.adm; do sed 's/direct voterss/direct voters/g' $i>
> `basename $i`.TMP; done
> for i in *.TMP; do mv $i `basename $i .TMP`; done
>
> for i in *.adm; do sed 's/jam CCOS scanner/jam scanner/g' $i>
> `basename $i`.TMP; done
> for i in *.TMP; do mv $i `basename $i .TMP`; done
>
> for i in *.adm; do sed 's/jam PCOS scanner/jam scanner/g' $i>
> `basename $i`.TMP; done
> for i in *.TMP; do mv $i `basename $i .TMP`; done
>
> :)
>
> THANKS!!!
>
> Jim
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
Hi Jim-
Something else I didn't point out is the use of quotes, didn't want to take
all the fun out of it =) If you have file names with spaces in them the
above will fail.
Thanks
-Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20100310/8be06ddd/attachment-0002.html>
More information about the tfug
mailing list