May 4, 2008 #1 mosama1 Technical User Joined Apr 23, 2008 Messages 7 Location EG Hi all, i want to use substring function in shell script,so how can i use it?
May 4, 2008 #2 MadMichael Programmer Joined Sep 30, 2004 Messages 130 Location US See my recent posting in this thread, the second script uses a substring function. Upvote 0 Downvote
May 5, 2008 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR man expr Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
May 5, 2008 #4 feherke Programmer Joined Aug 5, 2002 Messages 9,541 Location RO 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. http://rootshell.be/~feherke/ Upvote 0 Downvote
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. http://rootshell.be/~feherke/