O'Reilly logo

Linux Shell Scripting with Bash by Ken O. Burtch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Text File Processing

Several years ago, Dan, an old high school friend, arrived at my house with two photocopied binders and a CD-ROM. “You've got to try this,” he said. “This is version 0.9 of a free operating system called Linux.”

We loaded Linux onto a spare 386 computer. The distribution didn't show the current directory in the command prompt. After several minutes of searching and experimenting, Dan deleted his temporary files with rm -f *. After several seconds, he interrupted the command with a control-c and looked worried. “That was taking way too long. I think I was in the wrong directory.”

“How bad could the damage be?” I asked, typing ls. The shell responded with "command not found". He had been removing files in the /bin ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required