定义一个bash shell函数
Shell函数是一种将命令分组以便以后使用组的单个名称执行的方法。它们像常规命令一样执行。当shell函数的名称用作简单命令名时,将执行与该函数名相关联的命令列表。

使用以下语法声明函数:

[ function ] name () { command-list; }

这定义了一个名为name的shell函数。function 是可选的。

例子:

function lsl() { ls -l $1; }

function mcd() { mkdir $1 && cd $1; }

function 命令实例:

linux命令:function slugify() { echo "$@" | iconv -c -t ASCII//TRANSLIT//IGNORE | sed -r -e 's~[^[:alnum:]]+~ ~g' -e 's~^ *~~;s~ *$~~' -e 's~ +~-~g' | tr A-Z a-z; } } a-z; A-Z tr | +~-~g' 's~ -e *$~~' *~~;s~ 's~^ -e ~g' 's~[^[:alnum:]]+~ -e -r sed | ASCII//TRANSLIT//IGNORE -t -c iconv | "$@" echo { slugify() function function slugify() { echo "$@" | iconv -c -t ASCII//TRANSLIT//IGNORE | sed -r -e 's~[^[:alnum:]]+~ ~g' -e 's~^ *~~;s~ *$~~' -e 's~ +~-~g' | tr A-Z a-z; }rootopen.com
linux命令:function slugify() { echo "$@" | iconv -c -t ASCII//TRANSLIT//IGNORE | sed -r -e 's~[^[:alnum:]]+~ ~g' -e 's~^ *~~;s~ *$~~' -e 's~ +~-~g' | tr A-Z a-z; } } a-z; A-Z tr | +~-~g' 's~ -e *$~~' *~~;s~ 's~^ -e ~g' 's~[^[:alnum:]]+~ -e -r sed | ASCII//TRANSLIT//IGNORE -t -c iconv | "$@" echo { slugify() function function slugify() { echo "$@" | iconv -c -t ASCII//TRANSLIT//IGNORE | sed -r -e 's~[^[:alnum:]]+~ ~g' -e 's~^ *~~;s~ *$~~' -e 's~ +~-~g' | tr A-Z a-z; }rootopen.com
2019-06-17 23:16:05

linux命令:function _cd() { local dir="$(echo -n "${*//'\'/"/"}" | sed -e 's~\([a-z]\):~/mnt/\L\1~gi')"; if [ -d "$dir" ]; then cd "$dir"; fi; } } fi; "$dir"; cd then ]; "$dir" -d [ if 's~\([a-z]\):~/mnt/\L\1~gi')"; -e sed | "${*//'\'/"/"}" -n dir="$(echo local { _cd() function function _cd() { local dir="$(echo -n "${*//'\'/"/"}" | sed -e 's~\([a-z]\):~/mnt/\L\1~gi')"; if [ -d "$dir" ]; then cd "$dir"; fi; }rootopen.com
linux命令:function _cd() { local dir="$(echo -n "${*//'\'/"/"}" | sed -e 's~\([a-z]\):~/mnt/\L\1~gi')"; if [ -d "$dir" ]; then cd "$dir"; fi; } } fi; "$dir"; cd then ]; "$dir" -d [ if 's~\([a-z]\):~/mnt/\L\1~gi')"; -e sed | "${*//'\'/"/"}" -n dir="$(echo local { _cd() function function _cd() { local dir="$(echo -n "${*//'\'/"/"}" | sed -e 's~\([a-z]\):~/mnt/\L\1~gi')"; if [ -d "$dir" ]; then cd "$dir"; fi; }rootopen.com
2019-06-17 23:14:36

linux命令:function memo() { history | grep -i $@ | awk '! seen[$2]++'; } } seen[$2]++'; '! awk | $@ -i grep | history { memo() function function memo() { history | grep -i $@ | awk '! seen[$2]++'; }rootopen.com
linux命令:function memo() { history | grep -i $@ | awk '! seen[$2]++'; } } seen[$2]++'; '! awk | $@ -i grep | history { memo() function function memo() { history | grep -i $@ | awk '! seen[$2]++'; }rootopen.com
2019-06-04 22:32:08

linux命令:function URLEncode { local dataLength="${#1}"; local index; for ((index = 0;index < dataLength;index++)); do local char="${1:index:1}"; case $char in [a-zA-Z0-9.~_-]) printf "$char"; ;; *) printf "%%%02X" "'$char"; ;; esac; done; } } done; esac; ;; "'$char"; "%%%02X" printf *) ;; "$char"; printf [a-zA-Z0-9.~_-]) in $char case char="${1:index:1}"; local do dataLength;index++)); < 0;index = ((index for index; local dataLength="${#1}"; local { URLEncode function function URLEncode { local dataLength="${#1}"; local index; for ((index = 0;index < dataLength;index++)); do local char="${1:index:1}"; case $char in [a-zA-Z0-9.~_-]) printf "$char"; ;; *) printf "%%%02X" "'$char"; ;; esac; done; }rootopen.com
linux命令:function URLEncode { local dataLength="${#1}"; local index; for ((index = 0;index < dataLength;index++)); do local char="${1:index:1}"; case $char in [a-zA-Z0-9.~_-]) printf "$char"; ;; *) printf "%%%02X" "'$char"; ;; esac; done; } } done; esac; ;; "'$char"; "%%%02X" printf *) ;; "$char"; printf [a-zA-Z0-9.~_-]) in $char case char="${1:index:1}"; local do dataLength;index++)); < 0;index = ((index for index; local dataLength="${#1}"; local { URLEncode function function URLEncode { local dataLength="${#1}"; local index; for ((index = 0;index < dataLength;index++)); do local char="${1:index:1}"; case $char in [a-zA-Z0-9.~_-]) printf "$char"; ;; *) printf "%%%02X" "'$char"; ;; esac; done; }rootopen.com
2018-09-11 09:55:30

linux命令:function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); } } -c6-40); $sha1|cut -n $(echo -i -c1-5)|grep $sha1|cut -n https://api.pwnedpasswords.com/range/$(echo https://haveibeenpwned.com/' $'Referer: -H -s curl '\n'); -d toupper($0)}'|tr '{print "$1"|sha1sum|awk -n sha1=$(echo { hibp() function function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); }rootopen.com
linux命令:function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); } } -c6-40); $sha1|cut -n $(echo -i -c1-5)|grep $sha1|cut -n https://api.pwnedpasswords.com/range/$(echo https://haveibeenpwned.com/' $'Referer: -H -s curl '\n'); -d toupper($0)}'|tr '{print "$1"|sha1sum|awk -n sha1=$(echo { hibp() function function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); }rootopen.com
2018-08-19 23:16:07

linux命令:function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); } } -c6-40); $sha1|cut -n $(echo -i -c1-5)|grep $sha1|cut -n https://api.pwnedpasswords.com/range/$(echo https://haveibeenpwned.com/' $'Referer: -H -s curl '\n'); -d toupper($0)}'|tr '{print "$1"|sha1sum|awk -n sha1=$(echo { hibp() function function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); }rootopen.com
linux命令:function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); } } -c6-40); $sha1|cut -n $(echo -i -c1-5)|grep $sha1|cut -n https://api.pwnedpasswords.com/range/$(echo https://haveibeenpwned.com/' $'Referer: -H -s curl '\n'); -d toupper($0)}'|tr '{print "$1"|sha1sum|awk -n sha1=$(echo { hibp() function function hibp() { sha1=$(echo -n "$1"|sha1sum|awk '{print toupper($0)}'|tr -d '\n'); curl -s -H $'Referer: https://haveibeenpwned.com/' https://api.pwnedpasswords.com/range/$(echo -n $sha1|cut -c1-5)|grep -i $(echo -n $sha1|cut -c6-40); }rootopen.com
2018-08-15 22:28:34

linux命令:function wpoxiy () { # What percentage of X is Y? Where percent/100 = X/Y => percent=100*X/Y # Example: wpoxiy 10 5 # 50.00% # Example: wpoxiy 30 10 # 33.33% echo $(bc <<< "scale=2; y=${1}; x=${2}; percent=x*100/y; percent")"%"; } } percent")"%"; percent=x*100/y; x=${2}; y=${1}; "scale=2; <<< $(bc echo 33.33% # 10 30 wpoxiy Example: # 50.00% # 5 10 wpoxiy Example: # percent=100*X/Y => X/Y = percent/100 Where Y? is X of percentage What # { () wpoxiy function function wpoxiy () { # What percentage of X is Y? Where percent/100 = X/Y => percent=100*X/Y # Example: wpoxiy 10 5 # 50.00% # Example: wpoxiy 30 10 # 33.33% echo $(bc <<< "scale=2; y=${1}; x=${2}; percent=x*100/y; percent")"%"; }rootopen.com
linux命令:function wpoxiy () { # What percentage of X is Y? Where percent/100 = X/Y => percent=100*X/Y # Example: wpoxiy 10 5 # 50.00% # Example: wpoxiy 30 10 # 33.33% echo $(bc <<< "scale=2; y=${1}; x=${2}; percent=x*100/y; percent")"%"; } } percent")"%"; percent=x*100/y; x=${2}; y=${1}; "scale=2; <<< $(bc echo 33.33% # 10 30 wpoxiy Example: # 50.00% # 5 10 wpoxiy Example: # percent=100*X/Y => X/Y = percent/100 Where Y? is X of percentage What # { () wpoxiy function function wpoxiy () { # What percentage of X is Y? Where percent/100 = X/Y => percent=100*X/Y # Example: wpoxiy 10 5 # 50.00% # Example: wpoxiy 30 10 # 33.33% echo $(bc <<< "scale=2; y=${1}; x=${2}; percent=x*100/y; percent")"%"; }rootopen.com
2018-07-14 22:08:21

linux命令:function sshdel { perl -i -n -e "print unless (\$. == $1)" ~/.ssh/known_hosts; } } ~/.ssh/known_hosts; $1)" == (\$. unless "print -e -n -i perl { sshdel function function sshdel { perl -i -n -e "print unless (\$. == $1)" ~/.ssh/known_hosts; }rootopen.com
linux命令:function sshdel { perl -i -n -e "print unless (\$. == $1)" ~/.ssh/known_hosts; } } ~/.ssh/known_hosts; $1)" == (\$. unless "print -e -n -i perl { sshdel function function sshdel { perl -i -n -e "print unless (\$. == $1)" ~/.ssh/known_hosts; }rootopen.com
2018-05-28 22:17:48

linux命令:function man2pdf(){ man -t ${1:?Specify man as arg} | open -f -a preview; } } preview; -a -f open | arg} as man ${1:?Specify -t man man2pdf(){ function function man2pdf(){ man -t ${1:?Specify man as arg} | open -f -a preview; }rootopen.com
linux命令:function man2pdf(){ man -t ${1:?Specify man as arg} | open -f -a preview; } } preview; -a -f open | arg} as man ${1:?Specify -t man man2pdf(){ function function man2pdf(){ man -t ${1:?Specify man as arg} | open -f -a preview; }rootopen.com
2018-02-27 00:08:48

linux命令:function miso () { mkdir ~/ISO_CD && sudo mount -o loop "$@" ~/ISO_CD && cd ~/ISO_CD && ls; } function uiso () { cd ~ && sudo umount ~/ISO_CD && rm -r ~/ISO_CD; } } ~/ISO_CD; -r rm && ~/ISO_CD umount sudo && ~ cd { () uiso function } ls; && ~/ISO_CD cd && ~/ISO_CD "$@" loop -o mount sudo && ~/ISO_CD mkdir { () miso function function miso () { mkdir ~/ISO_CD && sudo mount -o loop "$@" ~/ISO_CD && cd ~/ISO_CD && ls; } function uiso () { cd ~ && sudo umount ~/ISO_CD && rm -r ~/ISO_CD; }rootopen.com
linux命令:function miso () { mkdir ~/ISO_CD && sudo mount -o loop "$@" ~/ISO_CD && cd ~/ISO_CD && ls; } function uiso () { cd ~ && sudo umount ~/ISO_CD && rm -r ~/ISO_CD; } } ~/ISO_CD; -r rm && ~/ISO_CD umount sudo && ~ cd { () uiso function } ls; && ~/ISO_CD cd && ~/ISO_CD "$@" loop -o mount sudo && ~/ISO_CD mkdir { () miso function function miso () { mkdir ~/ISO_CD && sudo mount -o loop "$@" ~/ISO_CD && cd ~/ISO_CD && ls; } function uiso () { cd ~ && sudo umount ~/ISO_CD && rm -r ~/ISO_CD; }rootopen.com
2018-03-29 15:53:48

linux命令:function cdls { cd $1; ls; } } ls; $1; cd { cdls function function cdls { cd $1; ls; }rootopen.com
linux命令:function cdls { cd $1; ls; } } ls; $1; cd { cdls function function cdls { cd $1; ls; }rootopen.com
2018-05-12 07:54:48

linux命令:function dpan () { PKG=`perl -e '$_=lc($ARGV[0]); s/::/-/g; print "lib$_-perl\n"' $1`; apt-get install $PKG; } } $PKG; install apt-get $1`; "lib$_-perl\n"' print s/::/-/g; '$_=lc($ARGV[0]); -e PKG=`perl { () dpan function function dpan () { PKG=`perl -e '$_=lc($ARGV[0]); s/::/-/g; print "lib$_-perl\n"' $1`; apt-get install $PKG; }rootopen.com
linux命令:function dpan () { PKG=`perl -e '$_=lc($ARGV[0]); s/::/-/g; print "lib$_-perl\n"' $1`; apt-get install $PKG; } } $PKG; install apt-get $1`; "lib$_-perl\n"' print s/::/-/g; '$_=lc($ARGV[0]); -e PKG=`perl { () dpan function function dpan () { PKG=`perl -e '$_=lc($ARGV[0]); s/::/-/g; print "lib$_-perl\n"' $1`; apt-get install $PKG; }rootopen.com
2018-02-11 06:18:48

linux命令:function t { ls -ltch $* | head -20 ; } } ; -20 head | $* -ltch ls { t function function t { ls -ltch $* | head -20 ; }rootopen.com
linux命令:function t { ls -ltch $* | head -20 ; } } ; -20 head | $* -ltch ls { t function function t { ls -ltch $* | head -20 ; }rootopen.com
2017-12-27 04:53:48

linux命令:function headers { head -1 $* | tr ',' '\12' | pr -t -n ; } } ; -n -t pr | '\12' ',' tr | $* -1 head { headers function function headers { head -1 $* | tr ',' '\12' | pr -t -n ; }rootopen.com
linux命令:function headers { head -1 $* | tr ',' '\12' | pr -t -n ; } } ; -n -t pr | '\12' ',' tr | $* -1 head { headers function function headers { head -1 $* | tr ',' '\12' | pr -t -n ; }rootopen.com
2018-01-01 12:54:48

linux命令:function crtonl { perl -i -ape 's/\r\n?/\n/g;' $* ; } } ; $* 's/\r\n?/\n/g;' -ape -i perl { crtonl function function crtonl { perl -i -ape 's/\r\n?/\n/g;' $* ; }rootopen.com
linux命令:function crtonl { perl -i -ape 's/\r\n?/\n/g;' $* ; } } ; $* 's/\r\n?/\n/g;' -ape -i perl { crtonl function function crtonl { perl -i -ape 's/\r\n?/\n/g;' $* ; }rootopen.com
2018-05-12 02:43:48

linux命令:function nuke() { if [ $(whoami) != "root" ] ; then for x in $@; do sudo apt-get autoremove --purge $x; done; else for x in $@; do apt-get autoremove --purge $x; done; fi } } fi done; $x; --purge autoremove apt-get do $@; in x for else done; $x; --purge autoremove apt-get sudo do $@; in x for then ; ] "root" != $(whoami) [ if { nuke() function function nuke() { if [ $(whoami) != "root" ] ; then for x in $@; do sudo apt-get autoremove --purge $x; done; else for x in $@; do apt-get autoremove --purge $x; done; fi }rootopen.com
linux命令:function nuke() { if [ $(whoami) != "root" ] ; then for x in $@; do sudo apt-get autoremove --purge $x; done; else for x in $@; do apt-get autoremove --purge $x; done; fi } } fi done; $x; --purge autoremove apt-get do $@; in x for else done; $x; --purge autoremove apt-get sudo do $@; in x for then ; ] "root" != $(whoami) [ if { nuke() function function nuke() { if [ $(whoami) != "root" ] ; then for x in $@; do sudo apt-get autoremove --purge $x; done; else for x in $@; do apt-get autoremove --purge $x; done; fi }rootopen.com
2018-04-01 11:20:48

linux命令:function fork () { tf=$(tempfile -d /tmp -p $1.);echo -n "$tf "; $@ &>$tf& } } &>$tf& $@ "; "$tf -n $1.);echo -p /tmp -d tf=$(tempfile { () fork function function fork () { tf=$(tempfile -d /tmp -p $1.);echo -n "$tf "; $@ &>$tf& }rootopen.com
linux命令:function fork () { tf=$(tempfile -d /tmp -p $1.);echo -n "$tf "; $@ &>$tf& } } &>$tf& $@ "; "$tf -n $1.);echo -p /tmp -d tf=$(tempfile { () fork function function fork () { tf=$(tempfile -d /tmp -p $1.);echo -n "$tf "; $@ &>$tf& }rootopen.com
2018-02-10 19:52:48

linux命令:function svnundopoint() { if [ -d .undo ]; then r=`svn info | grep Revision | cut -f 2 -d ' '` && t=`date +%F_%T` && f=${t}rev${r} && svn diff>.undo/$f && svn stat>.undo/stat_$f; else echo Missing .undo directory; fi } } fi directory; .undo Missing echo else stat>.undo/stat_$f; svn && diff>.undo/$f svn && f=${t}rev${r} && +%F_%T` t=`date && '` ' -d 2 -f cut | Revision grep | info r=`svn then ]; .undo -d [ if { svnundopoint() function function svnundopoint() { if [ -d .undo ]; then r=`svn info | grep Revision | cut -f 2 -d ' '` && t=`date +%F_%T` && f=${t}rev${r} && svn diff>.undo/$f && svn stat>.undo/stat_$f; else echo Missing .undo directory; fi }rootopen.com
linux命令:function svnundopoint() { if [ -d .undo ]; then r=`svn info | grep Revision | cut -f 2 -d ' '` && t=`date +%F_%T` && f=${t}rev${r} && svn diff>.undo/$f && svn stat>.undo/stat_$f; else echo Missing .undo directory; fi } } fi directory; .undo Missing echo else stat>.undo/stat_$f; svn && diff>.undo/$f svn && f=${t}rev${r} && +%F_%T` t=`date && '` ' -d 2 -f cut | Revision grep | info r=`svn then ]; .undo -d [ if { svnundopoint() function function svnundopoint() { if [ -d .undo ]; then r=`svn info | grep Revision | cut -f 2 -d ' '` && t=`date +%F_%T` && f=${t}rev${r} && svn diff>.undo/$f && svn stat>.undo/stat_$f; else echo Missing .undo directory; fi }rootopen.com
2018-03-13 14:03:48

linux命令:function jumpTo { xmms2 jump `xmms2 list | grep -i '$1' | head -n 1 | tail -n 1 | sed -re 's@.+\[(.+)/.+\] (.+)@\1@'`; } } (.+)@\1@'`; 's@.+\[(.+)/.+\] -re sed | 1 -n tail | 1 -n head | '$1' -i grep | list `xmms2 jump xmms2 { jumpTo function function jumpTo { xmms2 jump `xmms2 list | grep -i '$1' | head -n 1 | tail -n 1 | sed -re 's@.+\[(.+)/.+\] (.+)@\1@'`; }rootopen.com
linux命令:function jumpTo { xmms2 jump `xmms2 list | grep -i '$1' | head -n 1 | tail -n 1 | sed -re 's@.+\[(.+)/.+\] (.+)@\1@'`; } } (.+)@\1@'`; 's@.+\[(.+)/.+\] -re sed | 1 -n tail | 1 -n head | '$1' -i grep | list `xmms2 jump xmms2 { jumpTo function function jumpTo { xmms2 jump `xmms2 list | grep -i '$1' | head -n 1 | tail -n 1 | sed -re 's@.+\[(.+)/.+\] (.+)@\1@'`; }rootopen.com
2018-04-08 03:30:48

linux命令:function v { if [ -z $1 ]; then vim; else vim *$1*; fi } } fi *$1*; vim else vim; then ]; $1 -z [ if { v function function v { if [ -z $1 ]; then vim; else vim *$1*; fi }rootopen.com
linux命令:function v { if [ -z $1 ]; then vim; else vim *$1*; fi } } fi *$1*; vim else vim; then ]; $1 -z [ if { v function function v { if [ -z $1 ]; then vim; else vim *$1*; fi }rootopen.com
2018-06-11 15:47:48

linux命令:function echox { echo `tput cup $(($(tput lines))) $(( ($(tput cols) - $(echo "${#1}"))/2 ))`"$1"`tput cup $(tput lines) $(( $(tput cols)-1 ))`; } } ))`; cols)-1 $(tput $(( lines) $(tput cup ))`"$1"`tput "${#1}"))/2 $(echo - cols) ($(tput $(( lines))) $(($(tput cup `tput echo { echox function function echox { echo `tput cup $(($(tput lines))) $(( ($(tput cols) - $(echo "${#1}"))/2 ))`"$1"`tput cup $(tput lines) $(( $(tput cols)-1 ))`; }rootopen.com
linux命令:function echox { echo `tput cup $(($(tput lines))) $(( ($(tput cols) - $(echo "${#1}"))/2 ))`"$1"`tput cup $(tput lines) $(( $(tput cols)-1 ))`; } } ))`; cols)-1 $(tput $(( lines) $(tput cup ))`"$1"`tput "${#1}"))/2 $(echo - cols) ($(tput $(( lines))) $(($(tput cup `tput echo { echox function function echox { echo `tput cup $(($(tput lines))) $(( ($(tput cols) - $(echo "${#1}"))/2 ))`"$1"`tput cup $(tput lines) $(( $(tput cols)-1 ))`; }rootopen.com
2018-05-27 00:40:48

linux命令:function ec() { ec_var="`pwd`" && cd /etc/ && sudo bzr commit -m "$@" && cd $ec_var; } } $ec_var; cd && "$@" -m commit bzr sudo && /etc/ cd && ec_var="`pwd`" { ec() function function ec() { ec_var="`pwd`" && cd /etc/ && sudo bzr commit -m "$@" && cd $ec_var; }rootopen.com
linux命令:function ec() { ec_var="`pwd`" && cd /etc/ && sudo bzr commit -m "$@" && cd $ec_var; } } $ec_var; cd && "$@" -m commit bzr sudo && /etc/ cd && ec_var="`pwd`" { ec() function function ec() { ec_var="`pwd`" && cd /etc/ && sudo bzr commit -m "$@" && cd $ec_var; }rootopen.com
2018-03-28 15:43:48

linux命令:function autoCompleteHostname() { local hosts; local cur; hosts=($(awk '{print $1}' ~/.ssh/known_hosts | cut -d, -f1)); cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=($(compgen -W '${hosts[@]}' -- $cur )) } complete -F autoCompleteHostname ssh ssh autoCompleteHostname -F complete } )) $cur -- '${hosts[@]}' -W COMPREPLY=($(compgen cur=${COMP_WORDS[COMP_CWORD]}; -f1)); -d, cut | ~/.ssh/known_hosts $1}' '{print hosts=($(awk cur; local hosts; local { autoCompleteHostname() function function autoCompleteHostname() { local hosts; local cur; hosts=($(awk '{print $1}' ~/.ssh/known_hosts | cut -d, -f1)); cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=($(compgen -W '${hosts[@]}' -- $cur )) } complete -F autoCompleteHostname sshrootopen.com
linux命令:function autoCompleteHostname() { local hosts; local cur; hosts=($(awk '{print $1}' ~/.ssh/known_hosts | cut -d, -f1)); cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=($(compgen -W '${hosts[@]}' -- $cur )) } complete -F autoCompleteHostname ssh ssh autoCompleteHostname -F complete } )) $cur -- '${hosts[@]}' -W COMPREPLY=($(compgen cur=${COMP_WORDS[COMP_CWORD]}; -f1)); -d, cut | ~/.ssh/known_hosts $1}' '{print hosts=($(awk cur; local hosts; local { autoCompleteHostname() function function autoCompleteHostname() { local hosts; local cur; hosts=($(awk '{print $1}' ~/.ssh/known_hosts | cut -d, -f1)); cur=${COMP_WORDS[COMP_CWORD]}; COMPREPLY=($(compgen -W '${hosts[@]}' -- $cur )) } complete -F autoCompleteHostname sshrootopen.com
2018-05-05 18:01:48

linux命令:function mcd() { [ -n "$1" ] && mkdir -p "$@" && cd "$1"; } } "$1"; cd && "$@" -p mkdir && ] "$1" -n [ { mcd() function function mcd() { [ -n "$1" ] && mkdir -p "$@" && cd "$1"; }rootopen.com
linux命令:function mcd() { [ -n "$1" ] && mkdir -p "$@" && cd "$1"; } } "$1"; cd && "$@" -p mkdir && ] "$1" -n [ { mcd() function function mcd() { [ -n "$1" ] && mkdir -p "$@" && cd "$1"; }rootopen.com
2018-03-03 14:19:48

linux命令:function my_irc { tmp=`mktemp`; cat > $tmp; { echo -e "USER $username x x :$ircname\nNICK $nick\nJOIN $target"; while read line; do echo -e "PRIVMSG $target :$line"; done < $tmp; } | nc $server > /dev/null ; rm $tmp; } } $tmp; rm ; /dev/null > $server nc | } $tmp; < done :$line"; $target "PRIVMSG -e echo do line; read while $target"; $nick\nJOIN :$ircname\nNICK x x $username "USER -e echo { $tmp; > cat tmp=`mktemp`; { my_irc function function my_irc { tmp=`mktemp`; cat > $tmp; { echo -e "USER $username x x :$ircname\nNICK $nick\nJOIN $target"; while read line; do echo -e "PRIVMSG $target :$line"; done < $tmp; } | nc $server > /dev/null ; rm $tmp; }rootopen.com
linux命令:function my_irc { tmp=`mktemp`; cat > $tmp; { echo -e "USER $username x x :$ircname\nNICK $nick\nJOIN $target"; while read line; do echo -e "PRIVMSG $target :$line"; done < $tmp; } | nc $server > /dev/null ; rm $tmp; } } $tmp; rm ; /dev/null > $server nc | } $tmp; < done :$line"; $target "PRIVMSG -e echo do line; read while $target"; $nick\nJOIN :$ircname\nNICK x x $username "USER -e echo { $tmp; > cat tmp=`mktemp`; { my_irc function function my_irc { tmp=`mktemp`; cat > $tmp; { echo -e "USER $username x x :$ircname\nNICK $nick\nJOIN $target"; while read line; do echo -e "PRIVMSG $target :$line"; done < $tmp; } | nc $server > /dev/null ; rm $tmp; }rootopen.com
2018-04-08 18:04:48

linux命令:function duf { du -k $@ | sort -rn | perl -ne '($s,$f)=split(/\t/,$_,2);for(qw(K M G T)){if($s<1024){$x=($s<10?"%.1f":"%3d");printf("$x$_\t%s",$s,$f);last};$s/=1024}' } } T)){if($s<1024){$x=($s<10?"%.1f":"%3d");printf("$x$_\t%s",$s,$f);last};$s/=1024}' G M '($s,$f)=split(/\t/,$_,2);for(qw(K -ne perl | -rn sort | $@ -k du { duf function function duf { du -k $@ | sort -rn | perl -ne '($s,$f)=split(/\t/,$_,2);for(qw(K M G T)){if($s<1024){$x=($s<10?"%.1f":"%3d");printf("$x$_\t%s",$s,$f);last};$s/=1024}' }rootopen.com
linux命令:function duf { du -k $@ | sort -rn | perl -ne '($s,$f)=split(/\t/,$_,2);for(qw(K M G T)){if($s<1024){$x=($s<10?"%.1f":"%3d");printf("$x$_\t%s",$s,$f);last};$s/=1024}' } } T)){if($s<1024){$x=($s<10?"%.1f":"%3d");printf("$x$_\t%s",$s,$f);last};$s/=1024}' G M '($s,$f)=split(/\t/,$_,2);for(qw(K -ne perl | -rn sort | $@ -k du { duf function function duf { du -k $@ | sort -rn | perl -ne '($s,$f)=split(/\t/,$_,2);for(qw(K M G T)){if($s<1024){$x=($s<10?"%.1f":"%3d");printf("$x$_\t%s",$s,$f);last};$s/=1024}' }rootopen.com
2018-05-12 08:19:48

linux命令:function duf { du -sk "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done; } } done; done; size=$((size/1024)); fi; break; "${size}${unit}\t${fname}"; -e echo then ]; 1024 -lt $size [ if do Y; Z E P T G M k in unit for do fname; size read while | -n sort | "$@" -sk du { duf function function duf { du -sk "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done; }rootopen.com
linux命令:function duf { du -sk "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done; } } done; done; size=$((size/1024)); fi; break; "${size}${unit}\t${fname}"; -e echo then ]; 1024 -lt $size [ if do Y; Z E P T G M k in unit for do fname; size read while | -n sort | "$@" -sk du { duf function function duf { du -sk "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done; }rootopen.com
2018-03-05 04:36:48

linux命令:function fcd () { [ -f $1 ] && { cd $(dirname $1); } || { cd $1 ; } pwd } } pwd } ; $1 cd { || } $1); $(dirname cd { && ] $1 -f [ { () fcd function function fcd () { [ -f $1 ] && { cd $(dirname $1); } || { cd $1 ; } pwd }rootopen.com
linux命令:function fcd () { [ -f $1 ] && { cd $(dirname $1); } || { cd $1 ; } pwd } } pwd } ; $1 cd { || } $1); $(dirname cd { && ] $1 -f [ { () fcd function function fcd () { [ -f $1 ] && { cd $(dirname $1); } || { cd $1 ; } pwd }rootopen.com
2018-03-24 18:03:48

linux命令:function checkfor () { while :; do $*; sleep 5; done; } } done; 5; sleep $*; do :; while { () checkfor function function checkfor () { while :; do $*; sleep 5; done; }rootopen.com
linux命令:function checkfor () { while :; do $*; sleep 5; done; } } done; 5; sleep $*; do :; while { () checkfor function function checkfor () { while :; do $*; sleep 5; done; }rootopen.com
2018-02-08 08:49:48

linux命令:function catv { egrep -v "^$|^#" ${*} ; } } ; ${*} "^$|^#" -v egrep { catv function function catv { egrep -v "^$|^#" ${*} ; }rootopen.com
linux命令:function catv { egrep -v "^$|^#" ${*} ; } } ; ${*} "^$|^#" -v egrep { catv function function catv { egrep -v "^$|^#" ${*} ; }rootopen.com
2018-04-12 23:57:48

linux命令:function sepath { echo $PATH |tr ":" "\n" |sort -u |while read L ; do cd "$L" 2>/dev/null && find . \( ! -name . -prune \) \( -type f -o -type l \) 2>/dev/null |sed "s@^\./@@" |egrep -i "${*}" |sed "s@^@$L/@" ; done ; } } ; done ; "s@^@$L/@" |sed "${*}" -i |egrep "s@^\./@@" |sed 2>/dev/null \) l -type -o f -type \( \) -prune . -name ! \( . find && 2>/dev/null "$L" cd do ; L read |while -u |sort "\n" ":" |tr $PATH echo { sepath function function sepath { echo $PATH |tr ":" "\n" |sort -u |while read L ; do cd "$L" 2>/dev/null && find . \( ! -name . -prune \) \( -type f -o -type l \) 2>/dev/null |sed "s@^\./@@" |egrep -i "${*}" |sed "s@^@$L/@" ; done ; }rootopen.com
linux命令:function sepath { echo $PATH |tr ":" "\n" |sort -u |while read L ; do cd "$L" 2>/dev/null && find . \( ! -name . -prune \) \( -type f -o -type l \) 2>/dev/null |sed "s@^\./@@" |egrep -i "${*}" |sed "s@^@$L/@" ; done ; } } ; done ; "s@^@$L/@" |sed "${*}" -i |egrep "s@^\./@@" |sed 2>/dev/null \) l -type -o f -type \( \) -prune . -name ! \( . find && 2>/dev/null "$L" cd do ; L read |while -u |sort "\n" ":" |tr $PATH echo { sepath function function sepath { echo $PATH |tr ":" "\n" |sort -u |while read L ; do cd "$L" 2>/dev/null && find . \( ! -name . -prune \) \( -type f -o -type l \) 2>/dev/null |sed "s@^\./@@" |egrep -i "${*}" |sed "s@^@$L/@" ; done ; }rootopen.com
2018-05-27 17:52:48

linux命令:function nowrap { export COLS=`tput cols` ; cut -c-$COLS ; unset COLS ; } } ; COLS unset ; -c-$COLS cut ; cols` COLS=`tput export { nowrap function function nowrap { export COLS=`tput cols` ; cut -c-$COLS ; unset COLS ; }rootopen.com
linux命令:function nowrap { export COLS=`tput cols` ; cut -c-$COLS ; unset COLS ; } } ; COLS unset ; -c-$COLS cut ; cols` COLS=`tput export { nowrap function function nowrap { export COLS=`tput cols` ; cut -c-$COLS ; unset COLS ; }rootopen.com
2018-04-20 01:18:48

linux命令:function lsless() { ls "$@" | less; } } less; | "$@" ls { lsless() function function lsless() { ls "$@" | less; }rootopen.com
linux命令:function lsless() { ls "$@" | less; } } less; | "$@" ls { lsless() function function lsless() { ls "$@" | less; }rootopen.com
2018-03-01 11:07:48

linux命令:function decToBin { echo "ibase=10; obase=2; $1" | bc; } } bc; | $1" obase=2; "ibase=10; echo { decToBin function function decToBin { echo "ibase=10; obase=2; $1" | bc; }rootopen.com
linux命令:function decToBin { echo "ibase=10; obase=2; $1" | bc; } } bc; | $1" obase=2; "ibase=10; echo { decToBin function function decToBin { echo "ibase=10; obase=2; $1" | bc; }rootopen.com
2018-03-14 08:55:48

linux命令:function man2pdf(){ man -t ${1:?Specify man as arg} | ps2pdf -dCompatibility=1.3 - - > ${1}.pdf; } } ${1}.pdf; > - - -dCompatibility=1.3 ps2pdf | arg} as man ${1:?Specify -t man man2pdf(){ function function man2pdf(){ man -t ${1:?Specify man as arg} | ps2pdf -dCompatibility=1.3 - - > ${1}.pdf; }rootopen.com
linux命令:function man2pdf(){ man -t ${1:?Specify man as arg} | ps2pdf -dCompatibility=1.3 - - > ${1}.pdf; } } ${1}.pdf; > - - -dCompatibility=1.3 ps2pdf | arg} as man ${1:?Specify -t man man2pdf(){ function function man2pdf(){ man -t ${1:?Specify man as arg} | ps2pdf -dCompatibility=1.3 - - > ${1}.pdf; }rootopen.com
2018-01-22 02:52:48

linux命令:function ..(){ for ((j=${1:-1},i=0;i<j;i++));do builtin cd ..;done;} ..;done;} cd builtin ((j=${1:-1},i=0;i<j;i++));do for ..(){ function function ..(){ for ((j=${1:-1},i=0;i<j;i++));do builtin cd ..;done;}rootopen.com
linux命令:function ..(){ for ((j=${1:-1},i=0;i<j;i++));do builtin cd ..;done;} ..;done;} cd builtin ((j=${1:-1},i=0;i<j;i++));do for ..(){ function function ..(){ for ((j=${1:-1},i=0;i<j;i++));do builtin cd ..;done;}rootopen.com
2018-01-09 12:01:48

linux命令:function manpdf() {man -t $1 | ps2pdf - - | epdfview -} -} epdfview | - - ps2pdf | $1 -t {man manpdf() function function manpdf() {man -t $1 | ps2pdf - - | epdfview -}rootopen.com
linux命令:function manpdf() {man -t $1 | ps2pdf - - | epdfview -} -} epdfview | - - ps2pdf | $1 -t {man manpdf() function function manpdf() {man -t $1 | ps2pdf - - | epdfview -}rootopen.com
2018-01-24 03:35:48

linux命令:function titlescroll { _X=0 _TITLEMSG=$1 _WIDTH=${2:-16} _TITLEMSG=`printf "%$((${#_TITLEMSG}+$_WIDTH))s" "$_TITLEMSG"` while `true` do _X=$(((_X+1)%${#_TITLEMSG})) xtitle "${_TITLEMSG:_X:_WIDTH}" done } } done "${_TITLEMSG:_X:_WIDTH}" xtitle _X=$(((_X+1)%${#_TITLEMSG})) do `true` while "$_TITLEMSG"` "%$((${#_TITLEMSG}+$_WIDTH))s" _TITLEMSG=`printf _WIDTH=${2:-16} _TITLEMSG=$1 _X=0 { titlescroll function function titlescroll { _X=0 _TITLEMSG=$1 _WIDTH=${2:-16} _TITLEMSG=`printf "%$((${#_TITLEMSG}+$_WIDTH))s" "$_TITLEMSG"` while `true` do _X=$(((_X+1)%${#_TITLEMSG})) xtitle "${_TITLEMSG:_X:_WIDTH}" done }rootopen.com
linux命令:function titlescroll { _X=0 _TITLEMSG=$1 _WIDTH=${2:-16} _TITLEMSG=`printf "%$((${#_TITLEMSG}+$_WIDTH))s" "$_TITLEMSG"` while `true` do _X=$(((_X+1)%${#_TITLEMSG})) xtitle "${_TITLEMSG:_X:_WIDTH}" done } } done "${_TITLEMSG:_X:_WIDTH}" xtitle _X=$(((_X+1)%${#_TITLEMSG})) do `true` while "$_TITLEMSG"` "%$((${#_TITLEMSG}+$_WIDTH))s" _TITLEMSG=`printf _WIDTH=${2:-16} _TITLEMSG=$1 _X=0 { titlescroll function function titlescroll { _X=0 _TITLEMSG=$1 _WIDTH=${2:-16} _TITLEMSG=`printf "%$((${#_TITLEMSG}+$_WIDTH))s" "$_TITLEMSG"` while `true` do _X=$(((_X+1)%${#_TITLEMSG})) xtitle "${_TITLEMSG:_X:_WIDTH}" done }rootopen.com
2018-02-01 04:20:48

linux命令:function svnurl() { svn info $1 | egrep '^URL: (.*)' | sed s/URL\:\ //; } } //; s/URL\:\ sed | (.*)' '^URL: egrep | $1 info svn { svnurl() function function svnurl() { svn info $1 | egrep '^URL: (.*)' | sed s/URL\:\ //; }rootopen.com
linux命令:function svnurl() { svn info $1 | egrep '^URL: (.*)' | sed s/URL\:\ //; } } //; s/URL\:\ sed | (.*)' '^URL: egrep | $1 info svn { svnurl() function function svnurl() { svn info $1 | egrep '^URL: (.*)' | sed s/URL\:\ //; }rootopen.com
2018-04-26 21:21:48

linux命令:function setx(){ sed '/[xv]/!Q2' <<< $- && { set +xv; export PS4=">>> "; } || { export PS4="`tput setaf 3`>>> `tput sgr0`"; set -xv; }; } } }; -xv; set sgr0`"; `tput 3`>>> setaf PS4="`tput export { || } "; PS4=">>> export +xv; set { && $- <<< '/[xv]/!Q2' sed setx(){ function function setx(){ sed '/[xv]/!Q2' <<< $- && { set +xv; export PS4=">>> "; } || { export PS4="`tput setaf 3`>>> `tput sgr0`"; set -xv; }; }rootopen.com
linux命令:function setx(){ sed '/[xv]/!Q2' <<< $- && { set +xv; export PS4=">>> "; } || { export PS4="`tput setaf 3`>>> `tput sgr0`"; set -xv; }; } } }; -xv; set sgr0`"; `tput 3`>>> setaf PS4="`tput export { || } "; PS4=">>> export +xv; set { && $- <<< '/[xv]/!Q2' sed setx(){ function function setx(){ sed '/[xv]/!Q2' <<< $- && { set +xv; export PS4=">>> "; } || { export PS4="`tput setaf 3`>>> `tput sgr0`"; set -xv; }; }rootopen.com
2018-05-10 11:03:48

linux命令:function avg { awk "/$2/{sum += \$$1; lc += 1;} END {printf \"Average over %d lines: %f\n\", lc, sum/lc}"; } } sum/lc}"; lc, %f\n\", lines: %d over \"Average {printf END 1;} += lc \$$1; += "/$2/{sum awk { avg function function avg { awk "/$2/{sum += \$$1; lc += 1;} END {printf \"Average over %d lines: %f\n\", lc, sum/lc}"; }rootopen.com
linux命令:function avg { awk "/$2/{sum += \$$1; lc += 1;} END {printf \"Average over %d lines: %f\n\", lc, sum/lc}"; } } sum/lc}"; lc, %f\n\", lines: %d over \"Average {printf END 1;} += lc \$$1; += "/$2/{sum awk { avg function function avg { awk "/$2/{sum += \$$1; lc += 1;} END {printf \"Average over %d lines: %f\n\", lc, sum/lc}"; }rootopen.com
2018-01-14 00:10:48

linux命令:function skreemplay() { lynx -dump "http://skreemr.com/results.jsp?q=$*" | grep mp3$ | sed 's/^.* //' | xargs mplayer } } mplayer xargs | //' 's/^.* sed | mp3$ grep | "http://skreemr.com/results.jsp?q=$*" -dump lynx { skreemplay() function function skreemplay() { lynx -dump "http://skreemr.com/results.jsp?q=$*" | grep mp3$ | sed 's/^.* //' | xargs mplayer }rootopen.com
linux命令:function skreemplay() { lynx -dump "http://skreemr.com/results.jsp?q=$*" | grep mp3$ | sed 's/^.* //' | xargs mplayer } } mplayer xargs | //' 's/^.* sed | mp3$ grep | "http://skreemr.com/results.jsp?q=$*" -dump lynx { skreemplay() function function skreemplay() { lynx -dump "http://skreemr.com/results.jsp?q=$*" | grep mp3$ | sed 's/^.* //' | xargs mplayer }rootopen.com
2018-01-08 10:55:48

linux命令:function setTerm() { PROFILE=${1}; echo "tell app \"Terminal\" to set current settings of first window to settings set \"${PROFILE}\""|osascript; }; }; \"${PROFILE}\""|osascript; set settings to window first of settings current set to \"Terminal\" app "tell echo PROFILE=${1}; { setTerm() function function setTerm() { PROFILE=${1}; echo "tell app \"Terminal\" to set current settings of first window to settings set \"${PROFILE}\""|osascript; };rootopen.com
linux命令:function setTerm() { PROFILE=${1}; echo "tell app \"Terminal\" to set current settings of first window to settings set \"${PROFILE}\""|osascript; }; }; \"${PROFILE}\""|osascript; set settings to window first of settings current set to \"Terminal\" app "tell echo PROFILE=${1}; { setTerm() function function setTerm() { PROFILE=${1}; echo "tell app \"Terminal\" to set current settings of first window to settings set \"${PROFILE}\""|osascript; };rootopen.com
2018-02-08 16:54:48

linux命令:function wherepath () { for DIR in `echo $PATH | tr ":" "\n" | awk '!x[$0]++ {print $0}'`; do ls ${DIR}/$1 2>/dev/null; done } } done 2>/dev/null; ${DIR}/$1 ls do $0}'`; {print '!x[$0]++ awk | "\n" ":" tr | $PATH `echo in DIR for { () wherepath function function wherepath () { for DIR in `echo $PATH | tr ":" "\n" | awk '!x[$0]++ {print $0}'`; do ls ${DIR}/$1 2>/dev/null; done }rootopen.com
linux命令:function wherepath () { for DIR in `echo $PATH | tr ":" "\n" | awk '!x[$0]++ {print $0}'`; do ls ${DIR}/$1 2>/dev/null; done } } done 2>/dev/null; ${DIR}/$1 ls do $0}'`; {print '!x[$0]++ awk | "\n" ":" tr | $PATH `echo in DIR for { () wherepath function function wherepath () { for DIR in `echo $PATH | tr ":" "\n" | awk '!x[$0]++ {print $0}'`; do ls ${DIR}/$1 2>/dev/null; done }rootopen.com
2018-02-19 04:41:48

linux命令:function ends_in_y() { if [ `date +%A | sed -e 's/\(^.*\)\(.$\)/\2/'` == "y" ]; then echo 1; else echo 0; fi } } fi 0; echo else 1; echo then ]; "y" == 's/\(^.*\)\(.$\)/\2/'` -e sed | +%A `date [ if { ends_in_y() function function ends_in_y() { if [ `date +%A | sed -e 's/\(^.*\)\(.$\)/\2/'` == "y" ]; then echo 1; else echo 0; fi }rootopen.com
linux命令:function ends_in_y() { if [ `date +%A | sed -e 's/\(^.*\)\(.$\)/\2/'` == "y" ]; then echo 1; else echo 0; fi } } fi 0; echo else 1; echo then ]; "y" == 's/\(^.*\)\(.$\)/\2/'` -e sed | +%A `date [ if { ends_in_y() function function ends_in_y() { if [ `date +%A | sed -e 's/\(^.*\)\(.$\)/\2/'` == "y" ]; then echo 1; else echo 0; fi }rootopen.com
2018-01-22 05:59:48

linux命令:function ends_in_y() { case $(date +%A) in *y ) true ;; * ) false ;; esac } ; ends_in_y && echo ok ok echo && ends_in_y ; } esac ;; false ) * ;; true ) *y in +%A) $(date case { ends_in_y() function function ends_in_y() { case $(date +%A) in *y ) true ;; * ) false ;; esac } ; ends_in_y && echo okrootopen.com
linux命令:function ends_in_y() { case $(date +%A) in *y ) true ;; * ) false ;; esac } ; ends_in_y && echo ok ok echo && ends_in_y ; } esac ;; false ) * ;; true ) *y in +%A) $(date case { ends_in_y() function function ends_in_y() { case $(date +%A) in *y ) true ;; * ) false ;; esac } ; ends_in_y && echo okrootopen.com
2017-12-26 19:28:48

linux命令:function rrm(){ for i in $*; do; if [ -f $i ]; then; echo "rrm - Processing $i"; shred --force --remove --zero --verbose $i; else; echo "Can't process $i"; type=$(stat "$1" -c %F); echo "File $i is $type"; fi; done;} done;} fi; $type"; is $i "File echo %F); -c "$1" type=$(stat $i"; process "Can't echo else; $i; --verbose --zero --remove --force shred $i"; Processing - "rrm echo then; ]; $i -f [ if do; $*; in i for rrm(){ function function rrm(){ for i in $*; do; if [ -f $i ]; then; echo "rrm - Processing $i"; shred --force --remove --zero --verbose $i; else; echo "Can't process $i"; type=$(stat "$1" -c %F); echo "File $i is $type"; fi; done;}rootopen.com
linux命令:function rrm(){ for i in $*; do; if [ -f $i ]; then; echo "rrm - Processing $i"; shred --force --remove --zero --verbose $i; else; echo "Can't process $i"; type=$(stat "$1" -c %F); echo "File $i is $type"; fi; done;} done;} fi; $type"; is $i "File echo %F); -c "$1" type=$(stat $i"; process "Can't echo else; $i; --verbose --zero --remove --force shred $i"; Processing - "rrm echo then; ]; $i -f [ if do; $*; in i for rrm(){ function function rrm(){ for i in $*; do; if [ -f $i ]; then; echo "rrm - Processing $i"; shred --force --remove --zero --verbose $i; else; echo "Can't process $i"; type=$(stat "$1" -c %F); echo "File $i is $type"; fi; done;}rootopen.com
2018-03-15 15:45:48

linux命令:function countdown { case "$1" in -s) shift;; *) set $(($1 * 60));; esac; local S=" "; for i in $(seq "$1" -1 1); do echo -ne "$S\r $i\r"; sleep 1; done; echo -e "$S\rBOOM!"; } } "$S\rBOOM!"; -e echo done; 1; sleep $i\r"; "$S\r -ne echo do 1); -1 "$1" $(seq in i for "; S=" local esac; 60));; * $(($1 set *) shift;; -s) in "$1" case { countdown function function countdown { case "$1" in -s) shift;; *) set $(($1 * 60));; esac; local S=" "; for i in $(seq "$1" -1 1); do echo -ne "$S\r $i\r"; sleep 1; done; echo -e "$S\rBOOM!"; }rootopen.com
linux命令:function countdown { case "$1" in -s) shift;; *) set $(($1 * 60));; esac; local S=" "; for i in $(seq "$1" -1 1); do echo -ne "$S\r $i\r"; sleep 1; done; echo -e "$S\rBOOM!"; } } "$S\rBOOM!"; -e echo done; 1; sleep $i\r"; "$S\r -ne echo do 1); -1 "$1" $(seq in i for "; S=" local esac; 60));; * $(($1 set *) shift;; -s) in "$1" case { countdown function function countdown { case "$1" in -s) shift;; *) set $(($1 * 60));; esac; local S=" "; for i in $(seq "$1" -1 1); do echo -ne "$S\r $i\r"; sleep 1; done; echo -e "$S\rBOOM!"; }rootopen.com
2018-04-24 05:58:48

linux命令:function mg(){ man ${1} | egrep ${2} | more; } } more; | ${2} egrep | ${1} man mg(){ function function mg(){ man ${1} | egrep ${2} | more; }rootopen.com
linux命令:function mg(){ man ${1} | egrep ${2} | more; } } more; | ${2} egrep | ${1} man mg(){ function function mg(){ man ${1} | egrep ${2} | more; }rootopen.com
2018-01-30 13:15:48

linux命令:function ldd(){ objdump -p $1 | grep -i need; } } need; -i grep | $1 -p objdump ldd(){ function function ldd(){ objdump -p $1 | grep -i need; }rootopen.com
linux命令:function ldd(){ objdump -p $1 | grep -i need; } } need; -i grep | $1 -p objdump ldd(){ function function ldd(){ objdump -p $1 | grep -i need; }rootopen.com
2018-05-23 01:26:48

Linux的Bash命令行(A-Z排序)