[Tfug] Quick command line question...

Jim March 1.jim.march at gmail.com
Wed Mar 10 15:08:51 MST 2010


Ah.  Well fortunately there were no spaces in these filenames so we're all good.

Jim

On Wed, Mar 10, 2010 at 3:01 PM, brandon <brandons.daemon at gmail.com> wrote:
> 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
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
>




More information about the tfug mailing list