Hello Everyone,
I am relatively new to shell scripting.
I wish to simply do the following, take a string.
such as
"/folder/folder1/folder2 --skip_thingy --ps_name random --something"
and remove "--ps_name" (which is always the string I will "look" for) and whatever sting immediately after it, in this case "random".
So i am left with
"/folder/folder1/folder2 --skip_thingy --something"
Also keeping in mind that the order of the string, and string length could change.
So again,
Start here;
"/folderx/foldery/folderz --something3 --skip_thingy --ps_name random"
End here;
"/folderx/foldery/folderz --something3 --skip_thingy"
Any help would be appreciated!
Thanks
Ash