Dear guys,
I have a problem with to understand how the arguments passed could be used. and assigned in specific variable, regardless ordering of argument passed by the user
What i meant is
How i could get each value ? I could not just do as following, Because the user might pass parameter incorrect order.
I do aware with sed or awk usage, and i think it needs regular expression to search correct value
based on different option (e.g.: -e, -S,-c). And it is the problem for me, I dont know really understand well to create correct pattern of regexp. Could any help on this ?
Or maybe any other suggestion rather used sed ?
Thanks
I have a problem with to understand how the arguments passed could be used. and assigned in specific variable, regardless ordering of argument passed by the user
What i meant is
Code:
./eNothing.sh -e [I]value1[/I] -S [I]value2[/I] -c [I]value3[/I]
Code:
eValue1="$1"
eValue2="$3"
eValue3="$5"
based on different option (e.g.: -e, -S,-c). And it is the problem for me, I dont know really understand well to create correct pattern of regexp. Could any help on this ?
Or maybe any other suggestion rather used sed ?
Thanks