sed – stream editor for filtering and transforming text

commandline session $ 4.2.20 36 535—> cat tiles.txt 1. width 2 meters and 15 centimeters height 1 meters and 50 centimeters area = 2.15 * 1.50 = 3.225 square meter 2. width 2 meters and 15 centimeters height 43 centimeters area = .9245 square meter Sum = 4.1495 square meter. 1 tile = .1350 square …

accident in experiments : ls !a and ls ?a

accident in experiments $ 4.2.20 8 507—> cat .bashrc #export PS1=”[ 33[0;31m] $ V # ! ” export PS1=”$ V # !—> ” shellp() { pre=: post=: printf “$pre%s$postn” “$@” } $ 4.2.20 9 508—> shopt -u extglob accident fixme $ 4.2.20 10 509—> ls ?a NetworkSystemAdministration.pdf $ 4.2.20 26 525—> pwd /home/jeffrin $ 4.2.20 …

shopt . file expansion . shell option failglob

commandline session $ 4.2.20 29 495—> shellp *tcl :*tcl: $ 4.2.20 30 496—> shopt -s failglob $ 4.2.20 31 497—> shellp *tcl bash: no match: *tcl $ 4.2.20 32 498—> shopt -u failglob $ 4.2.20 33 499—> shellp *tcl :*tcl: $ 4.2.20 34 500—> shellp *t :aio.out: :a.out: :backsubmit.txt: :dpkg–list.output.txt: :icon-tut: :incomplete-resume.txt: :ls.txt: :movie-current: :music.web.txt: …

shopt . six shell options . nullglob

commandline session $ 4.2.20 8 463—> shellp *hacker :*hacker: $ 4.2.20 9 464—> shopt -s nullglob $ 4.2.20 10 4100—> shellp *hacker :: $ 4.2.20 11 466—> shellp *t :aio.out: :a.out: :backsubmit.txt: :dpkg–list.output.txt: :icon-tut: :incomplete-resume.txt: :ls.txt: :movie-current: :music.web.txt: :output.bubble-sort: :pagination.code.txt: :random.a1.txt: :random.a.modify.txt: :random.a.txt: :random.bin.txt: :result: :resume.txt: :rt: :sent: :setup.a.txt: :stdout: :test: :tiles.txt: :true.false.command.txt: :url?sa=t: :wget: …

function implementation for bash shell

commandline session $ 4.2.20 44 301—> cat .bashrc #export PS1=”[ 33[0;31m] $ V # ! ” export PS1=”$ V # !—> ” shellp() { pre=: post=: printf “$pr%s$pon” “$@” } $ 4.2.20 45 302—> shellp hacker cracker maker hacker cracker maker $ 4.2.20 46 303—> $ 4.2.20 2 457—> cat .bashrc #export PS1=”[ 33[0;31m] $ …