Command Line Kung Fu: Bash Scripting Tricks, Linux Shell Programming Tips, and Bash One-liners by Jason Cannon

Command Line Kung Fu: Bash Scripting Tricks, Linux Shell Programming Tips, and Bash One-liners by Jason Cannon

Author:Jason Cannon [Cannon, Jason]
Language: eng
Format: epub, mobi, pdf
Tags: Linux
Published: 2014-04-16T04:00:00+00:00


3340

$ sudo dmidecode --type memory

Size: No Module Installed

Size: 4096 MB

Size: No Module Installed

Size: 4096 MB

$ sudo dmidecode --type memory | grep 'Size:' | awk '{sum+=$2} END {print sum}'

8192

$

Automatically Answer Yes to Any Command

$ yes | command

$ yes "string" | command

If you are trying to automate a process that requires user input, check out the yes command. By default yes simply prints out "y" until it is killed. You can make yes repeat any string. If you wanted to automatically answer "no" you could run "yes no."



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.