gensup, was: Re: [CLUE-Tech] removing spaces from filenames?

Dave Price davep at kinaole.org
Mon Nov 18 11:05:01 MST 2002


On Mon, Nov 18, 2002 at 10:51:46AM -0700, Jed S. Baer wrote:
> > > 
> > > ls | awk '{print "mv " $1, gensub(" "),"_",1,$1)}' | sh
> 
> Oops, extra paren inside the argument list.
> gensub(" ","_",1,$1)
> 
Whare is gensub() defined?

[davep at dp:~]$ cat bin/aren
#!/bin/bash
ls | awk '{print "mv " $1, gensub(" ","_",1,$1)}' | sh


[davep at dp:~]$ aren "Dir with Spaces"
awk: line 2: function gensub never defined

aloha,
dave




More information about the clue-tech mailing list