l6.1b
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1B 代码 · 共 129 行
1B
129 行
#printSeveral of the programs we have been using as examples,such as "grep" and "wc", have the property that whenyou use file names with them, the output includesthe file names. For example, if you say grep pattern file1 file2 file3each line that contains "pattern" is printed outwith "file1:" or whatever in front of it.Sometimes you would love to get rid of that file name, sinceyou don't care a bit where the line came from,and the file name clutters up the output.One thing is to use "cat" to collect the files, andpipe into "grep"; in that case "grep" doesn't mentionany file name because there isn't one.In this directory there are several files whose names end in ".x". Use a pipeline of "cat" and "grep" to print all the linesthat contain the letters "ion", without any identifying filenames.Type "ready" when you're done.#create 0xion, but this one is in the wrong file!#create 1.xoo'oafoafishoafishlyoafishnessoakoakenoaksoakumoaroaredoarfishoarlockoarsmanoasesoasisoatoatcakeoatenoathoathsoatmealobbligatiobbligatoobbligatosobconicobcordateobduracyobdurate#create 2.xobduratelyobduratenessobeahobedienceobedientobedientlyobeisanceobeisantobeliobeliskobelizeobelusobeseobesityobeyobeyerobfuscateobfuscationobfuscatoryobiobitobituaryobjectobjectificationobjectifyobjectionobjectionableobjectionablenessobjectionablyobjective#create 3.xobjectivelyobjectivenessobjectivismobjectivistobjectivisticobjectivityobjectlessobjectorobjurgateobjurgationobjurgatoryoblanceolateoblastoblateoblateoblatenessoblationobligateobligatelyobligationobligatorilyobligatoryobligeobligeeobligerobligingobliginglyobligingnessobligorobliqueobliquelyobliquenessobliquityobliterate#copyout#user#uncopyoutgrep ion <.ocopy >X1cat *.x | grep ion >X2#cmp X1 X2#log#next6.1c
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?