home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 16632 < prev    next >
Encoding:
Text File  |  1992-11-14  |  861 b   |  33 lines

  1. Newsgroups: comp.os.linux
  2. Subject: Re: Bash help
  3. Path: sparky!uunet!think.com!unixland!rmkhome!rmk
  4. From: rmk@rmkhome.UUCP (Rick Kelly)
  5. Organization: The Man With Ten Cats
  6. Date: Fri, 13 Nov 1992 07:04:31 GMT
  7. Reply-To: rmk@rmkhome.UUCP (Rick Kelly)
  8. Message-ID: <9211130204.34@rmkhome.UUCP>
  9. References: <chengb.721589790@craft.camp.clarkson.edu>
  10. Lines: 21
  11.  
  12. In article <chengb.721589790@craft.camp.clarkson.edu> chengb@craft.camp.clarkson.edu (Bruce) writes:
  13. >Hi, I need to know how to get a type of alias to work in bash:
  14. >
  15. >like in csh, you can do: alias dir 'ls -laF \!* |more'
  16. >    to pass the parameter
  17. >in bash, I tried: alias dir='ls -laF $* |more'
  18. >and it wouldn't take the parameter correctly.
  19.  
  20.  
  21. You can do:
  22.  
  23. function dir
  24. {
  25.     ls -laF $* |more
  26. }
  27.  
  28. Put this in the same file with your aliases.
  29.  
  30. -- 
  31.  
  32. Rick Kelly    rmk@rmkhome.UUCP    unixland!rmkhome!rmk    rmk@frog.UUCP
  33.