Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: Globbing in csh Message-ID: <1991Feb17.211659.28355@athena.mit.edu> Date: 17 Feb 91 21:16:59 GMT References: <857@caslon.cs.arizona.edu> <1991Feb15.135812.5010@druid.uucp> <881@caslon.cs.arizona.edu> Sender: news@athena.mit.edu (News system) Distribution: na Organization: Massachusetts Institute of Technology Lines: 24 Using the "makealias" and "quote" aliases by Dan Bernstein (brnstnd@nyu.edu): % makealias mycat cat `ls | sed '1,/!*/d'` | less alias mycat 'cat `ls | sed '\''1,/\!*/d'\''` | less' I typed the "makealias mycat" command and the line starting with "cat", and got back an alias with all of the quoting correctly done. That line is what you would use to define the alias. And here are Dan's aliases, in case you want to do this again with something else: alias quote "/bin/sed 's/\\!/\\\\\!/g' | /bin/sed 's/'\\\''/'\\\'\\\\\\\'\\\''/g' | /bin/sed 's/^/'\''/' | /bin/sed 's/"\$"/'\''/'" alias makealias "quote | /bin/sed 's/^/alias \!:1 /' \!:2*" Pretty gross, but they do the job.... -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710