IUBio

Spaces in Unix file names

Michael Schmitz schmitz at lcbvax.cchem.berkeley.edu
Wed Oct 1 21:25:59 EST 1997


NICK STAFFA 361-5444 EXT. 410 wrote:
> Does anyone know how to doctor Fetch to always remove blanks?
> Does anyone have a script that'll remove blanks from filenames on a
> Unix System?

cat > noblank.awk << EOF
#!/usr/bin/awk -f
BEGIN { FS=" " }
{
	print "cp \"" $0 "\" " $1 $2 $3 $4
}
EOF

Not sure about how to quote the '"', and you might need to add a few
more fields or use $* if supported by your awk, but you get the idea.

find . -name \*.Seq | noblank.awk | /bin/sh should do what you want.

	Michael



More information about the Info-gcg mailing list

Send comments to us at biosci-help [At] net.bio.net