+ 22

What's the meaning of \ command in bash console?

Image result: https://s1.postimg.org/1og0b9pryn/Screenshot_119.png

3rd Oct 2017, 6:50 PM
Adi Pratama
Adi Pratama - avatar
4 ответов
+ 1
If i remember good it help you ls dir with tab of course.
18th Oct 2017, 9:39 PM
Trilogic
+ 4
See the simple example: if you need to print My name is "Kazi". like this. normally you will write in python : print(" My name is "Kazi".") but output will be error. so, you have to use: print("My name is \"Kazi\".") command in python to see like:My name is " Kazi". u can search in google(use of \ in Python) to more.
19th Oct 2017, 5:39 AM
Käzî Mrîdùl Høssäîn
Käzî Mrîdùl Høssäîn - avatar
+ 4
If you want to print statement which is in direct speech for example - print("John said, "I am not John"") ; this will give you errors to deal with because the compiler is confused when he reads this --> ...John""); You can use \ command before this ". So the final code will be --> print("John said, \"I am not John\"") ;
22nd Oct 2017, 7:58 AM
Vedansh Agrawal
Vedansh Agrawal - avatar
0
You can try to use Google ;) A backslash escapes the next character from being interpreted by the shell. If the next character is a newline, then the newline will not be interpreted as the end of the command by the shell. It effectively allows the a command to span multiple lines.
4th Oct 2017, 8:26 PM
Sergej Schelle
Sergej Schelle - avatar