![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing non Awk Argument in Awk | saifurshaon | Shell Programming and Scripting | 1 | 03-19-2009 06:57 AM |
| passing Argument | Shahul | Shell Programming and Scripting | 4 | 11-13-2008 08:50 AM |
| How to create a alias with an argument | ting123 | UNIX for Dummies Questions & Answers | 1 | 07-11-2007 08:43 PM |
| passing argument into awk | prkfriryce | Shell Programming and Scripting | 4 | 02-01-2007 04:44 PM |
| 1 alias 2 commands 1 argument | seba | UNIX for Dummies Questions & Answers | 3 | 09-01-2001 12:26 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Using * when passing argument to alias
I have some folders with this structure: /data/me/a123xxx Where "xxx" is some changing series of letters, and "123" changes so folders might look like: Code:
/data/me/a123xxx /data/me/a234ysd /data/me/a534sds etc. The numbers are what matter to me (they identify the folder), so I created an alias: alias gal 'cd /data/me/a\!*' So if I type gal 123* it'll bring me into the first folder. But I'd like to have to just type in gal 123 (and not have the * there). How do I put that * into the alias? ---------- Post updated 06-19-09 at 02:22 PM ---------- Previous update was 06-18-09 at 07:44 PM ---------- That might have been too long, here's a shorter version of my question: How do I make an alias for a command "gal" so that if I type in: Code:
gal 123 It will be interpreted as: Code:
cd /data/me/a123* Last edited by Yogesh Sawant; 06-19-2009 at 10:11 AM.. Reason: added code tags |
|
||||
|
Thanks! I've never used functions before in UNIX - what would that look like?
---------- Post updated at 06:19 PM ---------- Previous update was at 04:00 PM ---------- Oh, also, I'm using CSH (putting this all in my .cshrc file).... doing some reading it seems like this doesn't support functions? So.... is there any way for me to do what I'm trying to in my .cshrc? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|