|
From: | ChessDoter |
Subject: | sometimes surprised/confused |
Date: | Mon, 06 Jan 2014 14:42:16 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
Hello,as another member of this list kindly pointed out, it was a misunderstanding of mine to assume misbehavior in parallel. Sorry for that!
From the (mostly private) communication, i offer the following "compilation":
Initial post:
hello, far from being a power user with linux... ... i happen to play with parallel... and get confused/surprised at times. Like so: echo this should not happen | xargs -n 1 echo | parallel --dry-run -n 2 echo `echo {}` First, i was not able to separate the 4 words into different arguments with --colsep ' ', so that is why i used xargs in the mix. Then, i did not expect --dry-run to allow for execution of the embedded `echo` command. Ok, i can imagine scenarios, when this comes in handily... My current conclusion is: be VERY careful with this powerful tool, test thoroughly before execution but even then... (can i trust it?) beware of unexpected side-effects. just my 2 cents
what i intended to see could instead be produced with the following command:
echo -n "this should not happen" | parallel --dry-run -d ' ' -n 2 echo \`echo {}\`
which produces:
echo `echo this should` echo `echo not happen`
which in turn could be piped to a shell. This is to show:with proper escaping and parameters, it is indeed possible to get what my initial intention had been. Sorry for being confused and initially blaming outward.
best regards, C.D.
[Prev in Thread] | Current Thread | [Next in Thread] |