Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.UUCP Newsgroups: comp.unix.questions Subject: if-then-else in csh alias? Message-ID: <16128@teknowledge-vaxc.ARPA> Date: Thu, 27-Aug-87 03:03:34 EDT Article-I.D.: teknowle.16128 Posted: Thu Aug 27 03:03:34 1987 Date-Received: Sat, 29-Aug-87 07:45:12 EDT Organization: Teknowledge, Inc., Palo Alto CA Lines: 22 Keywords: can it be done I want to define an alias like: alias show 'if ($?\!:1) then \ if ($#\!:1) then \ echo "\!:1 = $\!:1" \ else \ echo "\!:1 is set" \ endif \ else \ echo "\!:1 is not set" \ endif' But the "\" at the end of each line doesn't embed a newline into the alias as needed for the if-then-else to work right. Is there any way to embed newlines into alias definitions? Mike Khaw -- internet: mkhaw@teknowledge-vaxc.arpa usenet: {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303