Re: use \000 in sed

2004-01-29 Thread Dan Nelson
In the last episode (Jan 30), Zhang Weiwu said: > Dan Nelson wrote: > >I'm not sure that sed can process \123-style octal characters, since > >it already uses the \ character for backreferences. Since you're > >only replacing one letter, you can use tr: > > > >manpath | tr ':' '\000' | xargs -0 ls

Re: use \000 in sed

2004-01-29 Thread Zhang Weiwu
Dan Nelson wrote: I'm not sure that sed can process \123-style octal characters, since it already uses the \ character for backreferences. Since you're only replacing one letter, you can use tr: manpath | tr ':' '\000' | xargs -0 ls oh Brilliant, i almost forgot this command! But once I need t

Re: use \000 in sed

2004-01-29 Thread Dan Nelson
In the last episode (Jan 29), Zhang Weiwu said: > Hello. I wish to see all the files in some pathes in a string. > > Say, I wish to list all files in $PATH and manpath(1) > > What I can think of is to use > #manpath | sed "s/:/ /g" |xargs ls > (This is useful when auto-completing man command in

use \000 in sed

2004-01-29 Thread Zhang Weiwu
Hello. I wish to see all the files in some pathes in a string. Say, I wish to list all files in $PATH and manpath(1) What I can think of is to use #manpath | sed "s/:/ /g" |xargs ls (This is useful when auto-completing man command in a shell, say, csh). This works, but the command is wrong when