LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help with batch file (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-batch-file-547465/)

Nerf Herder 04-19-2007 08:15 PM

need to die actually.
 
[mod_edit]yeah, i have some sort of problem[/mod_edit]

vxc69 04-19-2007 09:15 PM

I'm no expert but I'm pretty sure you have to write some shell scripts to get all of this done.

I know you can change the bash shells prompt by setting PS1='lastname>'. No clue how or where to retrieve the last name really (I think users real names are stored in different places/ways on different distributions). If you have your own DB setup with usernames and corresponding last names it should be easier.

As for expanding linux commands, you can do this by moving your executables to the bin directory. To find out the bin dirs use 'echo $PATH'.

I'm sure someone else should be able to shed some light.


Hope this post helps anyway,
vxc

Zmyrgel 04-19-2007 10:53 PM

Quote:

Originally Posted by Nerf Herder
This is what I mean to ask previously. Can anyone with experience please help?

I need to create a linux batch file/script that at at login time would set up my sessions environment so that the following new commands could be used for the standard linux operting systems commands.

Upon login system prompt is changed to LASTNAME>
Linux commands are expanded to include your customized commands
display contents of a directory => mycd
display date and time => mydt
logoff => myexit

Here's a Slackware page that has nice info on bash shell that you should read to get you going:
http://humanreadable.nfshost.com/sdeg/bash_startup.htm

Basicly just modify PS1 and PATH variables and setup the bash scripts to run the necessary commands to get your results.

Tinkster 04-20-2007 02:45 AM

And to me this looks like homework ....



Cheers,
Tink

vxc69 04-22-2007 11:34 AM

ummm, ok. Just don't go crazy. :tisk:

Tinkster 04-22-2007 01:52 PM

Quote:

Originally Posted by vxc69
ummm, ok. Just don't go crazy. :tisk:

Eh?

Who? Crazy?


Cheers,
Tink

vxc69 04-22-2007 04:56 PM

Quote:

Originally Posted by Tinkster
Eh?

Who? Crazy?

Not you Tink. Nerf here seems a bit disturbed.


All times are GMT -5. The time now is 01:12 PM.