首页 > 代码库 > Command Line 2

Command Line 2

1. Assign a string to a variable is the same as other language by using "=".
2. Use $ sign to access a variable.

  echo $FOOD  

3. Use export to create a environmental variable.

4. type python to enter the python shell. Use exit() to exit.

5. use $PATH to enter variable PATH.

6. Flags like the arguments of fucntion. us - to use flags. 

  ls -al #shows flag a and flag l

7. Longer flags like ingore need to use two dashes.

  ls --ignore=test.txt # we won‘t show the file named test.txt 

 

Command Line 2