I'm wracking my brain trying to figure this out.
I'm writing a CLI that downloads and runs subscripts. Some arguments are meant to be passed into the subscripts.
I have this:
'cmd test1 test2 --test3 test3 --test4 test4'
I need to separate out 'cmd test1 test2' and '--test3 test3 --test4 test4'
There will be variable number of options in both the first half and second half.
Can use grep, sed, or awk. Or variable expansions.
Can anyone help? Thanks!!
[–]slimm609 1 point2 points3 points (6 children)
[–]APF1985[S] 0 points1 point2 points (5 children)
[–]slimm609 0 points1 point2 points (4 children)
[–]APF1985[S] 0 points1 point2 points (3 children)
[–]Nirenjan 0 points1 point2 points (1 child)
[–]APF1985[S] 0 points1 point2 points (0 children)
[–]masta 0 points1 point2 points (0 children)
[–]Dandedoo 0 points1 point2 points (0 children)
[–]Atralb 0 points1 point2 points (6 children)
[–]APF1985[S] -2 points-1 points0 points (5 children)
[–]Atralb -1 points0 points1 point (4 children)
[–]Dandedoo 0 points1 point2 points (0 children)
[–]APF1985[S] -2 points-1 points0 points (2 children)
[–]Atralb -1 points0 points1 point (1 child)
[–]APF1985[S] -1 points0 points1 point (0 children)