$ read var_name #asks to input variable value
$ echo $var_name
$ echo "Hello, $var_name"b. Crontab
Schedule automatically running jobs/scripts for the system background.
$ crontab -e #create new cronjobDownload basically anything and everything on web.
$ wget -m -p -E -k www.example.comThe optional arguments are
-m, --mirror Turns on recursion and time-stamping, sets infinite
recursion depth, and keeps FTP directory listings.
-p, --page-requisites Get all images, etc. needed to display HTML page.
-E, --adjust-extension Save HTML/CSS files with .html/.css extensions.
-k, --convert-links Make links in downloaded HTML point to local files.
To download complete website html only,
$ wget -m www.ktustudy.in
Piping takes the raw output into the next command. Grep filters output text with matched pattern.
$ cat *.html | grep "Secret" #prints all line containing 'Secret'$ python -c "print 'kelox'" | python name.py
What's your name?
Welcome, kelox
$ echo solo | python name.py
What's your name?
Welcome, soloPerforms searching, find and replace, insertion or deletion.
$ sed -i 's/old-text/new-text/g' input.txt.
$ cat *.html | sed 's/yooo/yasss/g' . #replaces yooo with yasss