Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Substring

Status
Not open for further replies.

mosama1

Technical User
Apr 23, 2008
7
0
0
EG
Hi all,
i want to use substring function in shell script,so how can i use it?
 
man expr

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi

You forgot to specify what shell are you using, but anyway :
Bash:
[blue]master #[/blue] str='abcdefghijk'
[blue]master #[/blue] echo "${str:3:5}"
defgh

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top