Re:Stopping phishing campaigns with Bash
by b0re on Thursday August 13, 2020 @05:36AM
(#24141501)
noob question:
what does an \ at the end of a bash script do? Is it the same as ; ?
[ Parent
| on HN ]
Re:Stopping phishing campaigns with Bash
by oddeyed on Thursday August 13, 2020 @05:42AM
(#24141532)
The opposite. ; is the same as a newline. Prepending the newline with a backslash \ is like saying "pretend this newline isn't here". So all of the -H arguments get applied to the same command in the example, rather than being treated as commands in their own right.
Re:Stopping phishing campaigns with Bash
by newswasboring on Thursday August 13, 2020 @09:57AM
(#24143367)
Oh... I am having one of those moments where I feel like everyone else but me knew this and I'm a dummy. But when put like this, I realize \ here is an escape character thing, making the newline into \\n.
The end of a bash script or a line?
If it's at the end of the line it's just signifying that the line continues underneath and to run that block as "one line". It's just escaping the newline character.