We are introduced to Replit (for collaborative coding) and Cocalc (good for running various version of Python or different blocks of code in one place). Also we came to know about colab.google
pwd //this will print your current directory
cd /var
//If you want to navigate to the "/var" directory regardless of your current location, always use the absolute path with the leading slash
cd var
//this will only work when var directory is exists UNDER your current directory
cd //this will take you to the root directory
//use tab to show the avaiable files in the working directory
//create a new file- 3 different ways
touch filename.extension
nano filename.extension //this will use the nano editor //To save the file, press Ctrl + O (Write Out) and then Ctrl + X to exit Nano.
echo "This is the content of my new file." > my_file.txt
//output redirection > and >>
//these both will create a new file if the file does not exist
//but if the file exists, then > will overwrite the content of the target file
// on the other hand, >> will append
python main.py >> myfile.txt
//cat command read the file/s content and show it/them on terminal
cat filename
cat filename1 filename2 filename3
cat //only cat command will let you enter any number of lines and will echo them in the terminal
cat >> filename.txt
cat > filename.txt // so this command will echo what you write in the terminal to the filename.txt
cat filename | grep "Version"
//so here the grep command will run on the output of cat command
//press ^C (cntl + C) to terminate any command
cat rockyou.txt | head - 10
//this will show the first 10 lines from the rockyou.txt
cat rockyou.txt | tail - 10
//this will show the last 10 lines from the rockyou.txt
tail -f rockyou.txt
//this will show the latest lines from rockyou.txt BUT WILL NOT EXIT THE COMMAND which means
//you can see lines that are newly inserted to the file while the command is running
is used for **pattern scanning and processing (**like if they are space or comma separated items, there is a pattern and we can process them like print only the items on the 3rd column or so…)
<aside> 💡 `awk options 'selection _criteria {action }' input-file > output-file
//for example
$ awk '{print $1,$4}' employee.txt`
</aside>
https://www.geeksforgeeks.org/awk-command-unixlinux-examples/
https://www.digitalocean.com/community/tutorials/awk-command-linux-unix
https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/
https://www.tutorialspoint.com/awk-command-in-linux-with-examples