Oct 3, 2002 #1 lutech Programmer Joined Jan 25, 2002 Messages 16 Location CA Which command I can use to remove the first character from a string? Thanks in advance.
Oct 3, 2002 #2 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US one of the ways: echo "string" | sed -e 's/^.\(.*\)/\1/g' vlad +---------------------------+ |#include<disclaimer.h> | +---------------------------+ Upvote 0 Downvote
one of the ways: echo "string" | sed -e 's/^.\(.*\)/\1/g' vlad +---------------------------+ |#include<disclaimer.h> | +---------------------------+
Oct 3, 2002 #3 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US or in ksh [any POSIX compliant] echo "{myVar#?}" vlad +---------------------------+ |#include<disclaimer.h> | +---------------------------+ Upvote 0 Downvote
or in ksh [any POSIX compliant] echo "{myVar#?}" vlad +---------------------------+ |#include<disclaimer.h> | +---------------------------+
Oct 3, 2002 Thread starter #4 lutech Programmer Joined Jan 25, 2002 Messages 16 Location CA Thanks a lot. Upvote 0 Downvote
Oct 3, 2002 #5 CaKiwi Programmer Joined Apr 8, 2001 Messages 1,294 Location US Or slightly simpler version of the sed solution echo "string" | sed 's/^.//' CaKiwi Upvote 0 Downvote
Oct 3, 2002 #6 Chapter11 Technical User Joined Apr 15, 2002 Messages 791 Location US echo ${STRING} | cut -b 2- Upvote 0 Downvote