web page file string located: example of grep
alias-creation-netstat-comand.html: alias nst="'netstat -an | grep 192 | awk '\''{print '\$'5 }'\'' | awk -F : '\''{print '\'$'1}'\'' | sort | uniq'" alias-creation-netstat-comand.html: alias nst="netstat -an | grep 192 | awk '{print $5}' | awk -F : '{print $1}' | sort | uniq" alias-creation-netstat-comand.html: alias nst='netstat -an | grep 192 | awk '\''{print '\'$5 }'\'' | awk -F : '\''{print '\'$1}'\'' | sort | uniq' alias-creation-netstat-comand.html: alias nst='netstat -an | grep 192 | awk '\''{print }'\'' | awk -F : '\''{print }'\'' | sort | uniq' alias-creation-netstat-comand.html: netstat -an | grep 192 | awk '{print $5}' | awk -F : '{print $1}' | sort | uniq alias-creation-netstat-comand.html: cnf netstat -an | grep 192 | awk '{print 5 }' | awk -F : '{print '1}' | sort | uniq alias-creation-netstat-comand.html: echo "netstat -an | grep 192 | awk '{print $5}' | awk -F : '{print $1}' | sort | uniq" alias-creation-netstat-comand.html: If 'netstat -an | grep 192 | awk '{print 5 }' | awk -F : '{print '1}' | sort | uniq' is not a typo you can use command-not-found to lookup the package that contains it, like this: alias-creation-netstat-comand.html: netstat -an | grep 192 | awk '{print }' | awk -F : '{print }' | sort | uniq awk-example.html: last | awk '{print $1}' | grep -v root | grep -v reboot | sort | uniq -d awk-example.html: last | awk '{print $1}' | grep -v root | grep -v reboot | uniq -d | wc -l awk-example.html: last | awk '{print $1}' | grep -v root | uniq -d | wc -l awk-example.html: if I type "last | awk '{print $1}' | grep -v root | wc -l", # I get 88. awk-example.html: if I type "last | grep -v root | wc -l", # I get 88 occurrences. awk-example.html: john 9983 3421 0 23: 16 pts/6 00: 00: 00 grep --colour=auto xeyes awk-example.html: > last | awk '{print $1}' | grep -v root | grep -v reboot | sort | uniq -d awk-example.html: > last | awk '{print $1}' | grep -v root | grep -v reboot | uniq -d awk-example.html: ll | grep luser | grep lgroup | awk '{print "chown luser: othergp" " " $9}' > list awk-example.html: ps -ef | grep apache | awk '{print "kill " $2}' > /tmp/killproc awk-example.html: # ps -ef | grep userid > nuke.userid awk-example.html: ps -ef | grep xeyes awk-example.html: ps -ef | grep xeyes | awk '{print "kill " $2}' > /tmp/killproc ; sh /tmp/killproc ; cat /tmp/killproc awk-example.html: remsh $x last | awk '{print $1}' | grep -v root | grep -v reboot | sort | uniq -d \ awk-example.html: /usr/bin/env | grep DISPLAY awk-example.html: who am i -R | tr -d [\(-\)] | awk '{print $NF}' | grep -v : 0 | \ bashrc-the-dotfile.html: # alias dfh='/bin/df -h | /bin/grep sd' # optional - try command if you like it, uncomment and use chksys.sh.html: df -h | grep -v dev | grep -v tmpfs | grep -v rootfs | tee -a $LOG chksys.sh.html: echo "###( these are the nameservers used: `cat /etc/resolv.conf | grep nameserver | awk '{print $2}'` ) ###" | tee -a $LOG chksys.sh.html: echo "### (this system uses: `ifconfig -a | grep Bcast | awk '{print $2}' | cut -c 6-20` \ chksys.sh.html: fdisk -l /dev/sda | grep sda | tee -a $LOG chksys.sh.html: for its IP address with `route | grep default | awk '{print $2}'` as the gateway) ###" | tee -a $LOG chksys.sh.html: last | awk '{print $1}' | sort | uniq | grep -v root | grep -v reboot | grep -v wtmp| tee -a $LOG chksys.sh.html: last | grep reboot | tail -n 1 | tee -a $LOG commands-bash.txt: egrep Search file(s) for lines that match an extended expression commands-bash.txt: fgrep Search file(s) for lines that match a fixed string commands-bash.txt: grep Search file(s) for lines that match a given pattern extract-SSH-config-info.sh.txt: cat $x | grep -v ^# | grep -v ^$ | tee -a ssh-config.txt Find-grep-perl-one-liners.html: find ./ -type f -name '*.htm*' -exec grep Galations {} \; Find-grep-perl-one-liners.html: find ./ -type f -name '*.txt' -exec grep Galations {} \; Find-grep-perl-one-liners.html:using find, grep and perl at the command line
Find-grep-perl-one-liners.html: Linux example - find and grep, and perl replacement to fix a spelling error. find.html: -rw-r--r-- 1 john john 593 May 6 12: 44 ./grep-awk-uniq.txt fix-ftp.sh.txt: # cat /etc/ssh/sshd_config | grep -v ^# | grep -v ^$ fix-ftp.sh.txt: # penguin1: cat /etc/ssh/sshd_config | grep -v ^# | grep -v ^$ ftp-fixes-for-vsftp.conf.html: # another system: cat /etc/ssh/sshd_config | grep -v ^# | grep -v ^$ ftp-fixes-for-vsftp.conf.html: # cat /etc/ssh/sshd_config | grep -v ^# | grep -v ^$ ftp-fixes-for-vsftp.conf.html: cat /etc/vsftpd.conf | grep -v ^# grep-awk-uniq.html: grep -r "the" *.txt | awk -F : '{print $1}' | uniq grep-awk-uniq.html: grep -r the *.txt | awk -F : '{print $1}' | uniq | wc -l grep-awk-uniq.html: grep -r the *.txt | awk -F : '{print $1}' | wc -l grep-awk-uniq.html: killall nice ps renice top grep egrep fgrep sed regex vi fdisk grep-awk-uniq.html: To do a recursive grep for the word "the" in the current directory and all sub-directories HP-UX-workstation-build.html: /usr/bin/grep 60001 /etc/passwd HP-UX-workstation-build.html: /usr/bin/grep "+: *: *" /etc/group HP-UX-workstation-build.html: /usr/bin/grep sapdp00 /etc/services HP-UX-workstation-build.html: /usr/bin/grep sdhelp /etc/services lab-exercise-1.html: 17) type: ls -al | grep 0 lab-exercise-1.html: 23) to get rid of the 0 byte file, add another grep -v: (to continue a line for readability in a script you lab-exercise-1.html: 24) we've covered the 5 basic commands, introduced find, awk, grep and the vi editor. lab-exercise-1.html: ls -al | grep -v ^drwx | awk '{print "filename: "$9" is "$5" bytes" }' \ lab-exercise-1.html: ls -al | grep -v ^drwx | awk '{print "filename: "$9" is "$5" bytes" }' lab-exercise-1.html: ls -al | grep -v ^drwx | awk '{print "filename: "$9" is "$5" bytes" }' | grep -v "is bytes" lab-exercise-1.html: | grep -v "is bytes" | grep -v "txt is 0 bytes" lab-exercise-1.html: killall nice ps renice top grep egrep fgrep sed regex vi fdisk lab-exercise-2.html: env | grep -i path lab-exercise-2.html: env | grep ^PATH= lab-exercise-2.html: env | more ; env | grep -i PS lab-exercise-2.html: grep PATH .bashrc lab-exercise-2.html: grep Search file(s) for lines that match a given pattern lab-exercise-2.html: we also see other items in our grep... we could clean this up with the following command now that we know the PATH variable is uppercase: LPI-commands.txt: fgrep sed regex vi fdisk mkfs mkswap du df fsck e2fsck mke2fs debugfs dumpe2fs tune2fs LPI-commands.txt: xargs bg fg jobs kill nohup ps top free uptime killall nice ps renice top grep egrep man-page-create-textfiles.sh.txt: killall nice ps renice top grep egrep fgrep sed regex vi fdisk networkinfo.sh.html: cat /etc/resolv.conf | grep nameserver >> $LOG networkinfo.sh.html: cat /etc/resolv.conf | grep nameserver >> network.`date +'%Y_%m_%d'`.txt networkinfo.sh.html: cat /etc/resolv.conf | grep search >> $LOG networkinfo.sh.html: cat /etc/resolv.conf | grep search >> network.`date +'%Y_%m_%d'`.txt networkinfo.sh.html: ifconfig -a | grep Bcast >> $LOG networkinfo.sh.html: ifconfig -a | grep Bcast >> network.`date +'%Y_%m_%d'`.txt networkinfo.sh.html: ifconfig -a | grep HWaddr >> $LOG networkinfo.sh.html: ifconfig -a | grep HWaddr >> network.`date +'%Y_%m_%d'`.txt networkinfo.sh.html: route | grep default >> $LOG networkinfo.sh.html: route | grep default >> network.`date +'%Y_%m_%d'`.txt network-script.sh: cat /etc/resolv.conf | grep nameserver >> $LOG network-script.sh: cat /etc/resolv.conf | grep search >> $LOG network-script.sh: ifconfig -a | grep Bcast >> $LOG network-script.sh: ifconfig -a | grep HWaddr >> $LOG network-script.sh: route | grep default >> $LOG network-script.sh.txt: cat /etc/resolv.conf | grep nameserver >> $LOG network-script.sh.txt: cat /etc/resolv.conf | grep search >> $LOG network-script.sh.txt: ifconfig -a | grep Bcast >> $LOG network-script.sh.txt: ifconfig -a | grep HWaddr >> $LOG network-script.sh.txt: route | grep default >> $LOG RSYNC-cmd.txt: ps -ef | grep rsync rsync-example-man.html: ps -ef | grep rsync run-now-on-all-hosts.sh.txt: # e.g. sh ./runnow.sh "df -h | grep /dev/sda" (would replace the "x" with the "df" command command for every host.) run-now-on-all-hosts.sh.txt: # rsh $x cat /var/adm/messages | grep "`date | cut -c 5-11`" | tee -a $LOG run-now-on-all-hosts.sh.txt: # rsh $x sar | grep Average | awk '{print "sar average is usr_"$2" sys_"$3" wio_"$4" idle_"$5"%"}' | tee -a $LOG run-now-on-all-hosts.sh.txt: # ssh $x cat /var/adm/messages | grep "`date | cut -c 5-11`" | tee -a $LOG run-now-on-all-hosts.sh.txt: # ssh $x sar | grep Average | awk '{print "sar average is usr_"$2" sys_"$3" wio_"$4" idle_"$5"%"}' | tee -a $LOG SSH-setup-and-details.html: ps -ef | grep scp | grep -v color SSH-setup-and-details.html: cat $x | grep -v ^# | grep -v ^$ | tee -a ssh-config.txt Teaching-Outline-12-week-Linux-course-draft-using-a-book.txt: alias dff="df -h | grep -v udev"
SEARCH and Navigation TOOLFor the best synthetic lubricants, filters, and other automotive products use the free AMSOIL product guide, simply click and enter your year, make and model. visit AMSOIL's site, or call 1-800-956-5695, please use customer #283461 |
Computers: Toshiba Panasonic Toughbook Apple Dell Diesel Engines --- BioDiesel info Grand Wagoneer parts Jeep J10 accessories Automotive Repair Books
|
books by john:
Everett weather -- traffic --- News -- Middle East NASB/KJV-- South East Asian Missions -- BibleTech -- Voice of the Martyrs |
|