LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   not smart enough to find an alias 'how-to' (https://www.linuxquestions.org/questions/linux-general-1/not-smart-enough-to-find-an-alias-%27how-to%27-55879/)

rickenbacherus 04-19-2003 08:29 PM

not smart enough to find an alias 'how-to'
 
Anyone know of one I might peruse. Tried man alias, info alias, I googled and repeatedly found IP alias but isn't there more to it than that? Thanks for any direction.

cuckoopint 04-19-2003 08:37 PM

man 1 bash

search for alias (ie. '\alias')

(although there's not much to 'em)
; )

cuckoopint 04-19-2003 08:41 PM

maybe instead tell us what you're trying to do. (if anything in particular)

rickenbacherus 04-19-2003 09:44 PM

Quote:

Originally posted by cuckoopint
maybe instead tell us what you're trying to do. (if anything in particular)
Actually I was wondering if I could use alias so that I could simply type 'burnw' for example and have that command execute this:
cdrecord -v speed=4 dev=0,0 -audio track*.wav

and

'burnm' = cdrecord -v dev=0,0 -audio track*mp3

After looking at /etc/aliases I'm not so sure that 'alias' does what I thought it did. I'm reading the BASH man page but OMG it's a monster. Maybe I need to create scritps instead?

cuckoopint 04-19-2003 09:51 PM

Quote:

Actually I was wondering if I could use alias so that I could simply type 'burnw' for example and have that command execute this:
cdrecord -v speed=4 dev=0,0 -audio track*.wav
edit your ~/.bashrc (unless you want it global: /etc/profile)

something like:
Code:

alias burnw='cdrecord -v speed=4 dev=0,0 -audio track*.wav'
this won't work right away. you have to either login again, or execute

Code:

source ~/.bashrc
same thing for burnm
; )

cuckoopint 04-19-2003 09:57 PM

btw, I recommend changing that 'track*.wav' to something a little more permanent, if this is only referring to one directory (ie. ~/wav/track*.wav) This helps since you can execute the alias from any directory. OTOH, track*.wav would make it universal to all directories you may be working with. Your call.
; )

rickenbacherus 04-19-2003 10:20 PM

Quote:

Originally posted by cuckoopint
btw, I recommend changing that 'track*.wav' to something a little more permanent, if this is only referring to one directory (ie. ~/wav/track*.wav) This helps since you can execute the alias from any directory. OTOH, track*.wav would make it universal to all directories you may be working with. Your call.
; )

Here's the whole story- I have a 166Mhz w/ 80M -15G SCSI & SCSI cdrw. I want to make a network cdburning machine. Preferrably each user could ssh in, , copy whatever files you want (data, audio, video) into /users/own/dir then cd /users/own/dir and do a burnw. BUT I think I understand what you mean. You could change it so that you could execute it from any directory AND I could just burn everything in the directory instead of specifying .wav .mp3 etc. Oh and it just now hit me- I could really simplify copying files to /users/own/dir too!

I have windows users on the network who are scared of Linux. I suppose this is my way of forcing them to use it! heh heh :P

Thanks for the quick how-to cuckoopint. Am I to understand that I could make hundreds, nay thousands of aliases this way?? bwaahaaha ; ) what fun I'll have.


All times are GMT -5. The time now is 11:40 PM.