next up previous contents
Next: Basic Security Up: Shells Previous: aliases   Contents

Exercises

  1. I have a program, called names, which prompts the user for a series of names and telephone numbers. But I also have a file containing all that information, in the right order. How can I run names without having to type all the information on the keyboard$?$
  2. Take the same program names. Assume that the program usually reads all the information, then sorts the information by last name, and finally outputs the sorted information on the screen. But I want it in a file. How can I do that$?$ What if I want to append it to a file called sorted.names$?$
  3. I want to get rid of ALL my object files (they all end with .o). What one command can I use$?$
  4. I want to remove all my files beginning with a number, but also end with an upper case character. How do I do it in one command$?$
  5. I want to remove all four-character files beginning with z. What command can I use$?$
  6. List all equivalent commands (no wildcards) to rm my{fil,cap}e[1-4,7,9].
  7. I have a file containing an asterisk (*). How can I remove it$?$
  8. Assume I have a program that displays a list of dates on the screen. Let's call it display.dates. I then want to take that information, and count how many lines have been processed (I am not interested in seeing the intermediate output - all I want to know is how many lines were processed). What one-line command can I use$?$
  9. I am working on an ASCII terminal, and I need to run a job that takes fifteen (15) minutes to execute. But I also have to write and send a piece of mail to my boss. I have no window system, and I need to leave in 15 minutes. How can I resolve my problem$?$
  10. I'm in a C shell. How do I recall the last command I executed$?$ How do I recall the last command that started with la$?$ How do I change the 54 in my last command to 45$?$ How do I find out which aliases I am presently using$?$
  11. You are not sure whether you are using the C or Bourne shell. How can you find out$?$
  12. Why would one use SSH on their system$?$

next up previous contents
Next: Basic Security Up: Shells Previous: aliases   Contents
Claude Cantin 2010-10-24