"The Korn Shell" Exercises
1. Change your prompt (PS1) to display the current working directory. Change your second prompt to read "continue, master: ". 2. What is the value of your TERM and HOME environment variables? 3. What is the value of your PATH variable? Write this down. Now modify your PATH variable to only include the /usr/local directory. Try the date command again - what happens? Try the ls command. Then try the pwd and the cd commands. Log out and back in, then use the whence command to see if you can find out what happened. 4. Set the noclobber variable (enable it). Create a file named file_list by redirecting the standard output from an ls command. Then, try to overwrite this file by performing the exact same command again. What happens? 5. Create an alias named dir that you can use that stands for the following pipeline command: ls -aF | more Create an alias named where that stands for pwd. Create an alias named del that stands for "rm -i". 6. What is the value of your HISTSIZE variable? Enter the following commands: cd ls ls -al ps -ef who Use the fc -l command to list your previous commands. Use the r command to repeat your most recent ls command, referring to the ls command by number. Use the r command to repeat your most recent ps command, referring to the ps command by name instead of by number.
Next: The C Shell Up: The Korn Shell Previous: Summary   Contents |