bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stripping leading /


From: Charles Wilkins
Subject: stripping leading /
Date: Wed, 23 May 2001 23:17:33 GMT

I am looking for the most generic way to strip the leading frontslash
character from a string from within a shell script.

I know that this is easily done in bash by using this pattern matching
operator #.

example:

file="/home/user"
echo ${file#/}  

the output in bash would be:
home/user

What is the most generic way to do this for all shell scripts?

Thanks in advance for a prompt reply.
Feel free to email me direct at address@hidden

Best regards,
Charles Wilkins





reply via email to

[Prev in Thread] Current Thread [Next in Thread]