According to this cut command lacks --complement option. Any suggestions as how to get this?
I needed this as it is supported on Linux sh
My problem is quite similar to this so I tried following to make it work
#!/bin/sh
EXTRA=$@
REST=`echo $EXTRA | cut -d ' ' --complement -s -f1`
echo $REST
Any suggestions are welcome
PS: I cannot use bash instead of sh
cuton OSX doesn't support--complement, why would you think this would work? Can you explain what you are actually trying to accomplish, as there may be a way to do it that doesn't involve using this feature ofcut(in fact, may not usecutat all).EXTRA=$@is not a useful thing to do, which makes me doubt thatcutis the solution to what you want in the first place.