Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-27-2005, 03:16 PM
|
#1
|
LQ Newbie
Registered: Jan 2005
Location: Seattle
Distribution: RedHat 3.0 White Box
Posts: 5
Rep:
|
Shell Customization
New to scripting and adding aliases, and have this exercise with RHA, wondering if anyone could help
Edit your ~/.bashrc file, so that newly started bash shells have the following properties.
1. The alias dir executes the command ls -l.
2. The alias globoff disables pathname expansion (by enabling the appropriate shell flag).
3. The complimentary alias globon enables pathname expansion (by disabling the appropriate shell flag).
4. When redirecting output to a file, the bash shell will not clobber (overwrite) an already existing file.
5. The shell has the cdspell shell option enabled.
6. The rm command is aliased to rm -i.
Challenge Exercise
The following exercise may be completed as a challenge exercise. It will not be graded by the automated grading script.
Configure the primary prompt to contain the history number and exit code of the previously executed command, separated by a : (with no spaces). The colon should be the only colon contained in the prompt.
If appropriately configured, the prompt should have behavior similar to the following. Note carefully the behavior of the prompt after a successful command, after an unsuccessful command, and as it relates to the history number of the previously executed command.
[madonna@station madonna] 40:0 $ ls -d /tmp
/tmp
[madonna@station madonna] 41:0 $ ls -d /TMP
ls: /TMP: No such file or directory
[madonna@station madonna] 42:1 $ history
...
41 ls -d /tmp
42 ls -d /TMP
43 history
[madonna@station madonna] 43:0 $ !42
ls -d /TMP
ls: /TMP: No such file or directory
[madonna@station madonna] 44:1 $
|
|
|
01-27-2005, 03:21 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
You're joking right? most people actually try to slightly hide the fact that it's homework.....
please do not ask for help with assignments here. you need to learn for yourself.
|
|
|
01-27-2005, 03:33 PM
|
#3
|
Member
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849
Rep:
|
HAHA 
|
|
|
01-27-2005, 03:41 PM
|
#4
|
LQ Newbie
Registered: Jan 2005
Location: Seattle
Distribution: RedHat 3.0 White Box
Posts: 5
Original Poster
Rep:
|
Just hitting a brick wall right now with it, and that is why I came here for help..... It is part of learning... But as I understood you do not want me gathering information from this site?
|
|
|
01-27-2005, 04:00 PM
|
#5
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
LQ rules clearly state:
Quote:
Do not expect LQ members to do your homework - you will learn much more by doing it yourself.
|
Your question is a homework one. In such cases we don't answer directly. You'll get only general guidelines.
I recommend you to look into Bash reference here: http://www.gnu.org/software/bash/manual/bashref.html
You can find ansers by simply searching for keywords like alias or pathname. The way the questions are written makes this really easy.
|
|
|
01-27-2005, 04:11 PM
|
#6
|
LQ Newbie
Registered: Jan 2005
Location: Seattle
Distribution: RedHat 3.0 White Box
Posts: 5
Original Poster
Rep:
|
Thank you... It's nice to read other writing styles on the same topic... very usefull... Good day....
|
|
|
All times are GMT -5. The time now is 12:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|