[ale] string manipulation in sh script

Manuel Vazquez manuel.vazquez at dreefs.de
Thu Aug 28 09:00:46 EDT 2003


Thank you Geoffrey!
That's what I've been looking for

Bye

Am Don, 2003-08-28 um 14.52 schrieb Geoffrey:
> Manuel Vazquez wrote:
> > Hello list,
> > 
> > first of all, I have to say, that I am not a programmer. I only have a
> > basic knowledge in scripting and so on. My problem:
> > For example, I have a string "hello/world" or "/hello world" or "hello
> > world/" (don't know if that makes a difference)
> > 
> > How can I remove the "/" or any other thing from it.
> 
> echo 'hello/world' | tr -d '/'
> 
> tr -d removes all occurances of the character in the quotes.
> 
> Understand that in the above context you'll get:
> 
> helloworld
> 
> If you'd rather replace the character with a space, do:
> 
> tr '/' ' '
> 
> 
> Which replaces the first character in quotes with the second character 
> in quotes.
> 
> > 
> > Hope someone can help me. Thank you.
> > 
> > Manuel
> > 
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
> > 
> > 

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list