Comments on: 10 Useful Chaining Operators in Linux with Practical Examples https://www.tecmint.com/chaining-operators-in-linux-with-practical-examples/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 11 Dec 2023 05:12:16 +0000 hourly 1 By: Paul Thompson https://www.tecmint.com/chaining-operators-in-linux-with-practical-examples/comment-page-1/#comment-1795116 Sat, 14 May 2022 07:20:29 +0000 http://www.tecmint.com/?p=5078#comment-1795116 10. Example is showing escape characters, not concatenation. The operator has two functions, escape and concatenate.

Concatenation example:

mkdir a b \
c d

The above will create four directories, a b, c, and d.

Escape example:
echo "This \nis on two lines."

The above outputs the line split by a \n or new line escape character:

This
is on two lines.
]]>
By: khal https://www.tecmint.com/chaining-operators-in-linux-with-practical-examples/comment-page-1/#comment-1400925 Mon, 14 Dec 2020 15:58:52 +0000 http://www.tecmint.com/?p=5078#comment-1400925 Thanks, very useful and enlightening examples…

]]>
By: Hauke https://www.tecmint.com/chaining-operators-in-linux-with-practical-examples/comment-page-1/#comment-1387237 Mon, 09 Nov 2020 12:56:35 +0000 http://www.tecmint.com/?p=5078#comment-1387237 Hey there,

Nice article, thank you.

I got one question. As I understand it, the following statement, within the example for the precedence operator, is false:

“In the above pseudo command, what if the Command_x1 fails? Neither of the Command_x2, Command_x3, Command_x4 would be executed, for this, we use Precedence Operator, as:”
As is command_x1 fails, command_x2 will not be executed but Command_x3 will, and the execution of Command_x4 will depend on the result of Command_x3.

Cheers

Hauke

]]>
By: Muthalagu https://www.tecmint.com/chaining-operators-in-linux-with-practical-examples/comment-page-1/#comment-1322229 Sat, 21 Mar 2020 14:04:50 +0000 http://www.tecmint.com/?p=5078#comment-1322229 In reply to Muthalagu.

bash: !: event not found
[root@localhost tecmint]# rm -r !(*.html)
bash: !: event not found

]]>
By: Muthalagu https://www.tecmint.com/chaining-operators-in-linux-with-practical-examples/comment-page-1/#comment-1322228 Sat, 21 Mar 2020 14:04:18 +0000 http://www.tecmint.com/?p=5078#comment-1322228 As per your example, NOT operator is not working you gave rm -r !(*.html).

]]>