There is an existing bash script I need to modify, but I want to encapsulate the changes required to it in a function without affect how it manipulates the '$@' variable.
My idea is to copy the argument string to a new variable and extract the arguments required separately, but it seems that applying the 'shift' operates only on the $@
variable and modifies it permanently.
Is there way to emulate the processing of the $@
variable and its related functions on a normal string?