LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What does " / " mean? (http://www.linuxquestions.org/questions/linux-networking-3/what-does-mean-942678/)

sourav garai 05-01-2012 03:11 AM

What does " / " mean?
 
There was a command i found in a book. This is a single command.

iptables -A FORWARD -m tcp -p tcp -s 0/0 --sport 80 -d 172.16.1.0/24 /
--syn -j DROP

What does " / " mean? The " / " just before --syn.
Is it necessary to give?

em31amit 05-01-2012 03:17 AM

it should "\" not "/". "\" is just to switch new line in command continuation . it should not be "/" here. It may be they have typed it wrong.

sourav garai 05-01-2012 03:25 AM

Thanks
 
Ya .. i guessed it was for switching to a new line. Can u please suggest a link where i can read more about this?? In the book they have used " / " in all line switching. So i am little confused.

em31amit 05-01-2012 03:32 AM

Start with Beginner's guide and understand concepts how to make the rules and logic and MAN pages

check

tldp.org,
http://www.frozentux.net/iptables-tu...-tutorial.html
http://www.thegeekstuff.com/2011/01/...-fundamentals/

and At the last.. google is the best option :D

fukawi1 05-01-2012 03:40 AM

Quote:

3.1.2.1 Escape Character

A non-quoted backslash ‘\’ is the Bash escape character. It preserves the literal value of the next character that follows, with the exception of newline. If a \newline pair appears, and the backslash itself is not quoted, the \newline is treated as a line continuation (that is, it is removed from the input stream and effectively ignored).
http://www.gnu.org/software/bash/man...cape-Character

Searching the above document for "backslash" will explain all the possible uses of the backslash character as far as BASH is concerned.

sourav garai 05-01-2012 04:07 AM

So thats an escape character.
Thanks again.


All times are GMT -5. The time now is 07:53 PM.