[ale] Removing blanks
Jim Kinney
jim.kinney at gmail.com
Fri Jan 22 13:33:17 EST 2010
Ahh. Reread correctly.
1. Flog stupid M$ user
2. Lock out their account
3. use Geoffery's solution below
4. Flog user again to make the point clear
On Fri, Jan 22, 2010 at 12:53 PM, Geoffrey <lists at serioustechnology.com>wrote:
> Terry Bailey wrote:
> > I don't want to change any characters in a file. I want to change
> > each " " to a "_" within the file name itself.
>
> Multiple spaces in file name:
>
> mac/home/esoteric> filename="foo foo foo"
> mac/home/esoteric> ls "$filename"
> foo foo foo
> mac/home/esoteric> mv "$filename" $(echo "$filename"|tr " " "_")
> mac/home/esoteric> ls foo_foo__foo
> foo_foo__foo
>
> >
> > At 11:40 AM 1/22/2010, you wrote:
> >> Terry Bailey wrote:
> >>> Hi,
> >>>
> >>> Does anyone know how to use either a command or batch file to change
> >>> all the blanks in a file name to another character?
> >>>
> >>> I thought maybe sed would work, but if so, I have not been able to
> >>> figure it out.
> >> cat filename |tr " " "$NEWCHARACTER"
> >>
> >>> Thanks,
> >>>
> >>> Terry Bailey
> >>>
> >>> _______________________________________________
> >>> Ale mailing list
> >>> Ale at ale.org
> >>> http://mail.ale.org/mailman/listinfo/ale
> >>> See JOBS, ANNOUNCE and SCHOOLS lists at
> >>> http://mail.ale.org/mailman/listinfo
> >>>
> >>
> >> --
> >> Until later, Geoffrey
> >>
> >> "I predict future happiness for America if they can prevent
> >> the government from wasting the labors of the people under
> >> the pretense of taking care of them."
> >> - Thomas Jefferson
> >> _______________________________________________
> >> Ale mailing list
> >> Ale at ale.org
> >> http://mail.ale.org/mailman/listinfo/ale
> >> See JOBS, ANNOUNCE and SCHOOLS lists at
> >> http://mail.ale.org/mailman/listinfo
> >>
> >> __________ Information from ESET NOD32 Antivirus, version of virus
> >> signature database 4797 (20100122) __________
> >>
> >> The message was checked by ESET NOD32 Antivirus.
> >>
> >> http://www.eset.com
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> >
>
>
> --
> Until later, Geoffrey
>
> "I predict future happiness for America if they can prevent
> the government from wasting the labors of the people under
> the pretense of taking care of them."
> - Thomas Jefferson
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
--
--
James P. Kinney III
Actively in pursuit of Life, Liberty and Happiness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20100122/c75e85c6/attachment-0001.html
More information about the Ale
mailing list