printf

格式化并打印数据.
在格式控制下,将格式化参数写入标准输出。

语法

  printf format [argument]...

  printf --help

  printf --version

选项

   格式字符及其含义:

   \"     双引号

   \0NNN  字符与八进制值NNN(0到3位数)

   \\     反斜杠

   \a     警报(BEL)

   \b     退格

   \c     不产生进一步的输出

   \f     换页

   \n     换行

   \r     回车

   \t     水平标签

   \v     垂直标签

   \xNNN   十六进制值字节NNN(1至3位数)

   \uNNNN  十六进制值字符NNNN(4位)

   \UNNNNNNNN
          十六进制值字符NNNNNNNN(8位)

   %%      %

   %b     参数作为带有' \'转义解释的字符串

   %Wd    整数' W'数字位数 xxxx

   %W.De  科学记数法 x.xxxx e nnn. float, double

   %W.Df  固定格式 xx.xxxx. float, double

   %W.Dg  变量 `W' 位数,`D' 小数 xxxx.xx

   %q     以可以作为shell输入重用的格式输出相应的参数

   %s     字符串字符

格式是一个字符串,其中包含三种类型的对象:

简单字符,简单地复制到标准输出,
字符转义序列,转换并复制到标准输出,
格式规范,每个规范都会导致打印下一个连续的 参数。

成功时返回值为零,失败时返回值为非零

实例

打印十进制数字5后跟换行符 (\n)

$ printf "%d\n" 5
# 5

打印为浮点数 默认为6位小数)

$ printf "%f\n" 5
# 5.000000

打印文本后跟变量 $USER

$ printf "Hello, $USER.\n\n"

打印多行

$ printf %s "\              

显示变量

$ distance=15
$ printf "Distance is %5d Miles\n" $distance   
# Distance is    15 Miles

使用 \n 在任何地方换行:

$ printf "Two separate\nlines\n"
# Two separate
# lines

打印带有文本的十进制数字

$ printf "There are %d orders valued at over %d euros.\n" 64 1500
# There are 64 orders valued at over 1500 euros.

打印文本夹杂命令结果

$ printf "This is `uname -s` running on a `uname -m` processor.\n\n"

将十六进制数转换为十进制数

$ printf "%d\n " 0xF
15

将十进制数转换为十六进制

$ printf "0x%X\n " 15
# 0xF

将十进制数转换为八进制数

$ printf "0%o\n " 8
# 010

将八进制数转换为十进制

printf "%d\n " 010
# 8

printf 命令实例:

linux命令:printf "\e[38;5;1m"; while true; do printf "\e[?5h A L E R T %s\n" "$(date)"; sleep 0.1; printf "\e[?5l"; read -r -s -n1 -t1 && printf "\e[39m" && break; done done break; && "\e[39m" printf && -t1 -n1 -s -r read "\e[?5l"; printf 0.1; sleep "$(date)"; %s\n" T R E L A "\e[?5h printf do true; while "\e[38;5;1m"; printf printf "\e[38;5;1m"; while true; do printf "\e[?5h A L E R T %s\n" "$(date)"; sleep 0.1; printf "\e[?5l"; read -r -s -n1 -t1 && printf "\e[39m" && break; donerootopen.com
linux命令:printf "\e[38;5;1m"; while true; do printf "\e[?5h A L E R T %s\n" "$(date)"; sleep 0.1; printf "\e[?5l"; read -r -s -n1 -t1 && printf "\e[39m" && break; done done break; && "\e[39m" printf && -t1 -n1 -s -r read "\e[?5l"; printf 0.1; sleep "$(date)"; %s\n" T R E L A "\e[?5h printf do true; while "\e[38;5;1m"; printf printf "\e[38;5;1m"; while true; do printf "\e[?5h A L E R T %s\n" "$(date)"; sleep 0.1; printf "\e[?5l"; read -r -s -n1 -t1 && printf "\e[39m" && break; donerootopen.com
2019-07-09 21:25:53

linux命令:printf "1-minute load average: %.1f%%\n" \ $(bc <<<"$(cut -d ' ' -f 1 /proc/loadavg) * 100") 100") * /proc/loadavg) 1 -f ' ' -d <<<"$(cut $(bc \ %.1f%%\n" average: load "1-minute printf printf "1-minute load average: %.1f%%\n" \ $(bc <<<"$(cut -d ' ' -f 1 /proc/loadavg) * 100")rootopen.com
linux命令:printf "1-minute load average: %.1f%%\n" \ $(bc <<<"$(cut -d ' ' -f 1 /proc/loadavg) * 100") 100") * /proc/loadavg) 1 -f ' ' -d <<<"$(cut $(bc \ %.1f%%\n" average: load "1-minute printf printf "1-minute load average: %.1f%%\n" \ $(bc <<<"$(cut -d ' ' -f 1 /proc/loadavg) * 100")rootopen.com
2019-07-09 21:05:11

linux命令:printf "\033c" "\033c" printf printf "\033c"rootopen.com
linux命令:printf "\033c" "\033c" printf printf "\033c"rootopen.com
2019-06-03 22:39:48

linux命令:printf "IPv6 is "; [ $(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) -eq 0 ] && printf "enabled\n" || printf "disabled\n" "disabled\n" printf || "enabled\n" printf && ] 0 -eq /proc/sys/net/ipv6/conf/all/disable_ipv6) $(cat [ "; is "IPv6 printf printf "IPv6 is "; [ $(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) -eq 0 ] && printf "enabled\n" || printf "disabled\n"rootopen.com
linux命令:printf "IPv6 is "; [ $(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) -eq 0 ] && printf "enabled\n" || printf "disabled\n" "disabled\n" printf || "enabled\n" printf && ] 0 -eq /proc/sys/net/ipv6/conf/all/disable_ipv6) $(cat [ "; is "IPv6 printf printf "IPv6 is "; [ $(cat /proc/sys/net/ipv6/conf/all/disable_ipv6) -eq 0 ] && printf "enabled\n" || printf "disabled\n"rootopen.com
2019-02-12 21:04:26

linux命令:printf -v _hr "%*s" $(tput cols) && echo ${_hr// /${1--}} /${1--}} ${_hr// echo && cols) $(tput "%*s" _hr -v printf printf -v _hr "%*s" $(tput cols) && echo ${_hr// /${1--}}rootopen.com
linux命令:printf -v _hr "%*s" $(tput cols) && echo ${_hr// /${1--}} /${1--}} ${_hr// echo && cols) $(tput "%*s" _hr -v printf printf -v _hr "%*s" $(tput cols) && echo ${_hr// /${1--}}rootopen.com
2018-11-17 12:04:48

linux命令:printf "%`tput cols`s"|sed "s/ /_/g" /_/g" "s/ cols`s"|sed "%`tput printf printf "%`tput cols`s"|sed "s/ /_/g"rootopen.com
linux命令:printf "%`tput cols`s"|sed "s/ /_/g" /_/g" "s/ cols`s"|sed "%`tput printf printf "%`tput cols`s"|sed "s/ /_/g"rootopen.com
2018-11-17 12:03:07

linux命令:printf %g "$(bitcoin-cli estimatesmartfee 6 "ECONOMICAL" | jq .feerate*100000)";printf " sat/B estimated feerate for 6 confirmations as of $(date +%c)\nDivide by 100,000 to get btc/KB\n" btc/KB\n" get to 100,000 by +%c)\nDivide $(date of as confirmations 6 for feerate estimated sat/B " .feerate*100000)";printf jq | "ECONOMICAL" 6 estimatesmartfee "$(bitcoin-cli %g printf printf %g "$(bitcoin-cli estimatesmartfee 6 "ECONOMICAL" | jq .feerate*100000)";printf " sat/B estimated feerate for 6 confirmations as of $(date +%c)\nDivide by 100,000 to get btc/KB\n"rootopen.com
linux命令:printf %g "$(bitcoin-cli estimatesmartfee 6 "ECONOMICAL" | jq .feerate*100000)";printf " sat/B estimated feerate for 6 confirmations as of $(date +%c)\nDivide by 100,000 to get btc/KB\n" btc/KB\n" get to 100,000 by +%c)\nDivide $(date of as confirmations 6 for feerate estimated sat/B " .feerate*100000)";printf jq | "ECONOMICAL" 6 estimatesmartfee "$(bitcoin-cli %g printf printf %g "$(bitcoin-cli estimatesmartfee 6 "ECONOMICAL" | jq .feerate*100000)";printf " sat/B estimated feerate for 6 confirmations as of $(date +%c)\nDivide by 100,000 to get btc/KB\n"rootopen.com
2018-07-14 16:17:48

linux命令:printf %d 0x`dd if=/dev/urandom bs=1 count=4 2>/dev/null | od -x | awk 'NR==1 {print $2$3}'` $2$3}'` {print 'NR==1 awk | -x od | 2>/dev/null count=4 bs=1 if=/dev/urandom 0x`dd %d printf printf %d 0x`dd if=/dev/urandom bs=1 count=4 2>/dev/null | od -x | awk 'NR==1 {print $2$3}'`rootopen.com
linux命令:printf %d 0x`dd if=/dev/urandom bs=1 count=4 2>/dev/null | od -x | awk 'NR==1 {print $2$3}'` $2$3}'` {print 'NR==1 awk | -x od | 2>/dev/null count=4 bs=1 if=/dev/urandom 0x`dd %d printf printf %d 0x`dd if=/dev/urandom bs=1 count=4 2>/dev/null | od -x | awk 'NR==1 {print $2$3}'`rootopen.com
2018-04-10 10:12:48

linux命令:printf '\!:1\0\!:1\0\!:2' | mmencode | tr -d '\n' | sed 's/^/AUTH PLAIN /' /' PLAIN 's/^/AUTH sed | '\n' -d tr | mmencode | '\!:1\0\!:1\0\!:2' printf printf '\!:1\0\!:1\0\!:2' | mmencode | tr -d '\n' | sed 's/^/AUTH PLAIN /'rootopen.com
linux命令:printf '\!:1\0\!:1\0\!:2' | mmencode | tr -d '\n' | sed 's/^/AUTH PLAIN /' /' PLAIN 's/^/AUTH sed | '\n' -d tr | mmencode | '\!:1\0\!:1\0\!:2' printf printf '\!:1\0\!:1\0\!:2' | mmencode | tr -d '\n' | sed 's/^/AUTH PLAIN /'rootopen.com
2018-03-14 06:06:48

linux命令:printf "%'d\n" 1234567 1234567 "%'d\n" printf printf "%'d\n" 1234567rootopen.com
linux命令:printf "%'d\n" 1234567 1234567 "%'d\n" printf printf "%'d\n" 1234567rootopen.com
2018-05-21 06:06:48

linux命令:printf '%*s\n' 20 | tr ' ' '#' '#' ' ' tr | 20 '%*s\n' printf printf '%*s\n' 20 | tr ' ' '#'rootopen.com
linux命令:printf '%*s\n' 20 | tr ' ' '#' '#' ' ' tr | 20 '%*s\n' printf printf '%*s\n' 20 | tr ' ' '#'rootopen.com
2018-01-01 19:59:48

linux命令:printf "%02u " {3..20}; echo echo {3..20}; " "%02u printf printf "%02u " {3..20}; echorootopen.com
linux命令:printf "%02u " {3..20}; echo echo {3..20}; " "%02u printf printf "%02u " {3..20}; echorootopen.com
2018-04-29 05:10:48

linux命令:printf "%d\n" "'A" "'B" "'B" "'A" "%d\n" printf printf "%d\n" "'A" "'B"rootopen.com
linux命令:printf "%d\n" "'A" "'B" "'B" "'A" "%d\n" printf printf "%d\n" "'A" "'B"rootopen.com
2018-05-05 06:15:48

linux命令:printf "%s\n" .* .* "%s\n" printf printf "%s\n" .*rootopen.com
linux命令:printf "%s\n" .* .* "%s\n" printf printf "%s\n" .*rootopen.com
2018-05-11 04:08:48

linux命令:printf "%s\n" .* .* "%s\n" printf printf "%s\n" .*rootopen.com
linux命令:printf "%s\n" .* .* "%s\n" printf printf "%s\n" .*rootopen.com
2018-04-08 08:30:48

linux命令:printf "%s\n" ${PATH//:/\/* } } ${PATH//:/\/* "%s\n" printf printf "%s\n" ${PATH//:/\/* }rootopen.com
linux命令:printf "%s\n" ${PATH//:/\/* } } ${PATH//:/\/* "%s\n" printf printf "%s\n" ${PATH//:/\/* }rootopen.com
2018-05-03 23:53:48

linux命令:printf $(echo -n $1 | sed 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g') 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g') sed | $1 -n $(echo printf printf $(echo -n $1 | sed 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g')rootopen.com
linux命令:printf $(echo -n $1 | sed 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g') 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g') sed | $1 -n $(echo printf printf $(echo -n $1 | sed 's/\\/\\\\/g;s/\(%\)\([0-9a-fA-F][0-9a-fA-F]\)/\\x\2/g')rootopen.com
2018-03-15 17:49:48

linux命令:printf "%s\n" !(pattern) ## ksh, or bash with shopt -s extglob extglob -s shopt with bash or ksh, ## !(pattern) "%s\n" printf printf "%s\n" !(pattern) ## ksh, or bash with shopt -s extglobrootopen.com
linux命令:printf "%s\n" !(pattern) ## ksh, or bash with shopt -s extglob extglob -s shopt with bash or ksh, ## !(pattern) "%s\n" printf printf "%s\n" !(pattern) ## ksh, or bash with shopt -s extglobrootopen.com
2018-05-13 13:12:48

linux命令:printf "\e[8;70;180;t" "\e[8;70;180;t" printf printf "\e[8;70;180;t"rootopen.com
linux命令:printf "\e[8;70;180;t" "\e[8;70;180;t" printf printf "\e[8;70;180;t"rootopen.com
2018-03-08 21:21:48

linux命令:printf "%50s\n"|tr ' ' - - ' ' "%50s\n"|tr printf printf "%50s\n"|tr ' ' -rootopen.com
linux命令:printf "%50s\n"|tr ' ' - - ' ' "%50s\n"|tr printf printf "%50s\n"|tr ' ' -rootopen.com
2018-04-02 17:54:48

linux命令:printf "%d\n" \0x64 \0x64 "%d\n" printf printf "%d\n" \0x64rootopen.com
linux命令:printf "%d\n" \0x64 \0x64 "%d\n" printf printf "%d\n" \0x64rootopen.com
2018-02-08 06:03:48

linux命令:printf "%.50d" 0 | tr 0 - - 0 tr | 0 "%.50d" printf printf "%.50d" 0 | tr 0 -rootopen.com
linux命令:printf "%.50d" 0 | tr 0 - - 0 tr | 0 "%.50d" printf printf "%.50d" 0 | tr 0 -rootopen.com
2018-05-12 11:52:48

linux命令:printf ${PATH//:/\\n} ${PATH//:/\\n} printf printf ${PATH//:/\\n}rootopen.com
linux命令:printf ${PATH//:/\\n} ${PATH//:/\\n} printf printf ${PATH//:/\\n}rootopen.com
2018-05-04 16:55:48

linux命令:printf "%`tput cols`s"|tr ' ' '#' '#' ' ' cols`s"|tr "%`tput printf printf "%`tput cols`s"|tr ' ' '#'rootopen.com
linux命令:printf "%`tput cols`s"|tr ' ' '#' '#' ' ' cols`s"|tr "%`tput printf printf "%`tput cols`s"|tr ' ' '#'rootopen.com
2018-02-21 06:44:48

linux命令:printf -v row "%${COLUMNS}s"; echo ${row// /#} /#} ${row// echo "%${COLUMNS}s"; row -v printf printf -v row "%${COLUMNS}s"; echo ${row// /#}rootopen.com
linux命令:printf -v row "%${COLUMNS}s"; echo ${row// /#} /#} ${row// echo "%${COLUMNS}s"; row -v printf printf -v row "%${COLUMNS}s"; echo ${row// /#}rootopen.com
2018-02-11 13:26:48

linux命令:printf "\n%25s%10sTOTAL\n" 'FILE TYPE' ' '; for ext in $(find . -iname \*.* | egrep -o '\.[^[:space:].]+$' | egrep -v '\.svn*' | sort -f | uniq -i); do count=$(find . -iname \*$ext | wc -l); printf "%25s%10s%d\n" $ext ' ' $count; done done $count; ' ' $ext "%25s%10s%d\n" printf -l); wc | \*$ext -iname . count=$(find do -i); uniq | -f sort | '\.svn*' -v egrep | '\.[^[:space:].]+$' -o egrep | \*.* -iname . $(find in ext for '; ' TYPE' 'FILE "\n%25s%10sTOTAL\n" printf printf "\n%25s%10sTOTAL\n" 'FILE TYPE' ' '; for ext in $(find . -iname \*.* | egrep -o '\.[^[:space:].]+$' | egrep -v '\.svn*' | sort -f | uniq -i); do count=$(find . -iname \*$ext | wc -l); printf "%25s%10s%d\n" $ext ' ' $count; donerootopen.com
linux命令:printf "\n%25s%10sTOTAL\n" 'FILE TYPE' ' '; for ext in $(find . -iname \*.* | egrep -o '\.[^[:space:].]+$' | egrep -v '\.svn*' | sort -f | uniq -i); do count=$(find . -iname \*$ext | wc -l); printf "%25s%10s%d\n" $ext ' ' $count; done done $count; ' ' $ext "%25s%10s%d\n" printf -l); wc | \*$ext -iname . count=$(find do -i); uniq | -f sort | '\.svn*' -v egrep | '\.[^[:space:].]+$' -o egrep | \*.* -iname . $(find in ext for '; ' TYPE' 'FILE "\n%25s%10sTOTAL\n" printf printf "\n%25s%10sTOTAL\n" 'FILE TYPE' ' '; for ext in $(find . -iname \*.* | egrep -o '\.[^[:space:].]+$' | egrep -v '\.svn*' | sort -f | uniq -i); do count=$(find . -iname \*$ext | wc -l); printf "%25s%10s%d\n" $ext ' ' $count; donerootopen.com
2018-02-08 03:32:48

linux命令:printf $(( echo "obase=16;$(echo $$$(date +%s%N))"|bc; ip link show|sed -n '/eth/ {N; p}'|grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|head -c 17 )|tr -d [:space:][:punct:] |sed 's/[[:xdigit:]]\{2\}/\\x&/g')|sha1sum|head -c 32; echo echo 32; -c 's/[[:xdigit:]]\{2\}/\\x&/g')|sha1sum|head |sed [:space:][:punct:] -d )|tr 17 -c '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|head -E -o p}'|grep {N; '/eth/ -n show|sed link ip +%s%N))"|bc; $$$(date "obase=16;$(echo echo $(( printf printf $(( echo "obase=16;$(echo $$$(date +%s%N))"|bc; ip link show|sed -n '/eth/ {N; p}'|grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|head -c 17 )|tr -d [:space:][:punct:] |sed 's/[[:xdigit:]]\{2\}/\\x&/g')|sha1sum|head -c 32; echorootopen.com
linux命令:printf $(( echo "obase=16;$(echo $$$(date +%s%N))"|bc; ip link show|sed -n '/eth/ {N; p}'|grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|head -c 17 )|tr -d [:space:][:punct:] |sed 's/[[:xdigit:]]\{2\}/\\x&/g')|sha1sum|head -c 32; echo echo 32; -c 's/[[:xdigit:]]\{2\}/\\x&/g')|sha1sum|head |sed [:space:][:punct:] -d )|tr 17 -c '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|head -E -o p}'|grep {N; '/eth/ -n show|sed link ip +%s%N))"|bc; $$$(date "obase=16;$(echo echo $(( printf printf $(( echo "obase=16;$(echo $$$(date +%s%N))"|bc; ip link show|sed -n '/eth/ {N; p}'|grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|head -c 17 )|tr -d [:space:][:punct:] |sed 's/[[:xdigit:]]\{2\}/\\x&/g')|sha1sum|head -c 32; echorootopen.com
2018-01-29 23:51:48

linux命令:printf "$string" | md5sum md5sum | "$string" printf printf "$string" | md5sumrootopen.com
linux命令:printf "$string" | md5sum md5sum | "$string" printf printf "$string" | md5sumrootopen.com
2018-02-27 23:44:48

linux命令:printf "g/^/m0\nw\nq"|ed $FILE $FILE "g/^/m0\nw\nq"|ed printf printf "g/^/m0\nw\nq"|ed $FILErootopen.com
linux命令:printf "g/^/m0\nw\nq"|ed $FILE $FILE "g/^/m0\nw\nq"|ed printf printf "g/^/m0\nw\nq"|ed $FILErootopen.com
2018-03-16 03:06:48

linux命令:printf "%02d:%02d\n" $(curl -s "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" | grep -E '(Es ist jetzt|ago)' | sed 's/<[^>]*>//g;s/[^[:digit:]]//g' | xargs ) ) xargs | 's/<[^>]*>//g;s/[^[:digit:]]//g' sed | jetzt|ago)' ist '(Es -E grep | "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" -s $(curl "%02d:%02d\n" printf printf "%02d:%02d\n" $(curl -s "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" | grep -E '(Es ist jetzt|ago)' | sed 's/<[^>]*>//g;s/[^[:digit:]]//g' | xargs )rootopen.com
linux命令:printf "%02d:%02d\n" $(curl -s "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" | grep -E '(Es ist jetzt|ago)' | sed 's/<[^>]*>//g;s/[^[:digit:]]//g' | xargs ) ) xargs | 's/<[^>]*>//g;s/[^[:digit:]]//g' sed | jetzt|ago)' ist '(Es -E grep | "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" -s $(curl "%02d:%02d\n" printf printf "%02d:%02d\n" $(curl -s "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" | grep -E '(Es ist jetzt|ago)' | sed 's/<[^>]*>//g;s/[^[:digit:]]//g' | xargs )rootopen.com
2018-02-24 15:31:48

linux命令:printf "$PWD/%s\n" * * "$PWD/%s\n" printf printf "$PWD/%s\n" *rootopen.com
linux命令:printf "$PWD/%s\n" * * "$PWD/%s\n" printf printf "$PWD/%s\n" *rootopen.com
2018-01-17 09:05:48

linux命令:printf "%$(tput cols)s\n"|tr ' ' '=' '=' ' ' cols)s\n"|tr "%$(tput printf printf "%$(tput cols)s\n"|tr ' ' '='rootopen.com
linux命令:printf "%$(tput cols)s\n"|tr ' ' '=' '=' ' ' cols)s\n"|tr "%$(tput printf printf "%$(tput cols)s\n"|tr ' ' '='rootopen.com
2018-01-13 00:57:48

linux命令:printf "%s," "${LIST[@]}" | cut -d "," -f 1-${#LIST[@]} 1-${#LIST[@]} -f "," -d cut | "${LIST[@]}" "%s," printf printf "%s," "${LIST[@]}" | cut -d "," -f 1-${#LIST[@]}rootopen.com
linux命令:printf "%s," "${LIST[@]}" | cut -d "," -f 1-${#LIST[@]} 1-${#LIST[@]} -f "," -d cut | "${LIST[@]}" "%s," printf printf "%s," "${LIST[@]}" | cut -d "," -f 1-${#LIST[@]}rootopen.com
2018-05-06 01:21:48

linux命令:printf "\ec" "\ec" printf printf "\ec"rootopen.com
linux命令:printf "\ec" "\ec" printf printf "\ec"rootopen.com
2018-06-07 21:53:48

linux命令:printf -- " -e %s" ${ARRAY[*]} ${ARRAY[*]} %s" -e " -- printf printf -- " -e %s" ${ARRAY[*]}rootopen.com
linux命令:printf -- " -e %s" ${ARRAY[*]} ${ARRAY[*]} %s" -e " -- printf printf -- " -e %s" ${ARRAY[*]}rootopen.com
2018-06-11 05:55:48

linux命令:printf "%s\t%s\t%s\n" {1..9} '*' 0 '#' '#' 0 '*' {1..9} "%s\t%s\t%s\n" printf printf "%s\t%s\t%s\n" {1..9} '*' 0 '#'rootopen.com
linux命令:printf "%s\t%s\t%s\n" {1..9} '*' 0 '#' '#' 0 '*' {1..9} "%s\t%s\t%s\n" printf printf "%s\t%s\t%s\n" {1..9} '*' 0 '#'rootopen.com
2018-02-07 10:44:48

linux命令:printf "\e[7m%-`tput cols`s\e[0m\n" "Full width highlighted line" line" highlighted width "Full cols`s\e[0m\n" "\e[7m%-`tput printf printf "\e[7m%-`tput cols`s\e[0m\n" "Full width highlighted line"rootopen.com
linux命令:printf "\e[7m%-`tput cols`s\e[0m\n" "Full width highlighted line" line" highlighted width "Full cols`s\e[0m\n" "\e[7m%-`tput printf printf "\e[7m%-`tput cols`s\e[0m\n" "Full width highlighted line"rootopen.com
2018-05-21 13:01:48

linux命令:printf "\U$(printf '%x' $((RANDOM%79+128512)) )" )" $((RANDOM%79+128512)) '%x' "\U$(printf printf printf "\U$(printf '%x' $((RANDOM%79+128512)) )"rootopen.com
linux命令:printf "\U$(printf '%x' $((RANDOM%79+128512)) )" )" $((RANDOM%79+128512)) '%x' "\U$(printf printf printf "\U$(printf '%x' $((RANDOM%79+128512)) )"rootopen.com
2018-04-19 14:46:48

linux命令:printf '%s-%s-%s-%s\n' $(grep -v "[A-Z]\|'" /usr/share/dict/british | shuf -n 4) 4) -n shuf | /usr/share/dict/british "[A-Z]\|'" -v $(grep '%s-%s-%s-%s\n' printf printf '%s-%s-%s-%s\n' $(grep -v "[A-Z]\|'" /usr/share/dict/british | shuf -n 4)rootopen.com
linux命令:printf '%s-%s-%s-%s\n' $(grep -v "[A-Z]\|'" /usr/share/dict/british | shuf -n 4) 4) -n shuf | /usr/share/dict/british "[A-Z]\|'" -v $(grep '%s-%s-%s-%s\n' printf printf '%s-%s-%s-%s\n' $(grep -v "[A-Z]\|'" /usr/share/dict/british | shuf -n 4)rootopen.com
2018-02-28 02:58:48

linux命令:printf -vl "%${COLUMNS:-`tput cols 2>&-||echo 80`}s\n" && echo ${l// /-}; /-}; ${l// echo && 80`}s\n" 2>&-||echo cols "%${COLUMNS:-`tput -vl printf printf -vl "%${COLUMNS:-`tput cols 2>&-||echo 80`}s\n" && echo ${l// /-};rootopen.com
linux命令:printf -vl "%${COLUMNS:-`tput cols 2>&-||echo 80`}s\n" && echo ${l// /-}; /-}; ${l// echo && 80`}s\n" 2>&-||echo cols "%${COLUMNS:-`tput -vl printf printf -vl "%${COLUMNS:-`tput cols 2>&-||echo 80`}s\n" && echo ${l// /-};rootopen.com
2018-04-27 01:08:48

linux命令:printf "%x\n" $(seq 0 255) | xargs -n1 -IH echo -ne \\xH > test.dat test.dat > \\xH -ne echo -IH -n1 xargs | 255) 0 $(seq "%x\n" printf printf "%x\n" $(seq 0 255) | xargs -n1 -IH echo -ne \\xH > test.datrootopen.com
linux命令:printf "%x\n" $(seq 0 255) | xargs -n1 -IH echo -ne \\xH > test.dat test.dat > \\xH -ne echo -IH -n1 xargs | 255) 0 $(seq "%x\n" printf printf "%x\n" $(seq 0 255) | xargs -n1 -IH echo -ne \\xH > test.datrootopen.com
2018-05-05 07:48:48

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