nullArray Posted May 28, 2009 Share Posted May 28, 2009 $var = `sh hello.sh && echo "Complete"`; I'm running something like this and have some conditional statements that are looking for "complete," but if hello.sh runs and has some output, then it will ALL save into $var. Is there a way I can save only the last eight characters? Thanks. EDIT: I think it would have to use substr, but I don't see how I can make it work assuming that I don't know how many characters are before "Complete." Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.