Xref: utzoo comp.unix.xenix:5977 comp.unix.questions:13592 comp.unix.wizards:16132 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.xenix,comp.unix.questions,comp.unix.wizards Subject: Re: Ugly file name Keywords: rm cat mv regexp Message-ID: <17509@mimsy.UUCP> Date: 14 May 89 18:57:43 GMT References: <128@tdl.UUCP> <7170@bsu-cs.bsu.edu> <12970@ut-emx.UUCP> <535@visdc.UUCP> Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 20 In article <535@visdc.UUCP> jiii@visdc.UUCP (John E Van Deusen III) writes: >When your back is up against the wall, the following construct can be >used to replace any argument and will allow you to do anything you want: > > "`echo '\xxx\xxx\xxx\c'`" > >where xxx is any octal number. Only if you are dealing with a broken SysV echo (echo should *not* do escape interpretation, and even `echo -n' is iffy); and even then you may have trouble generating meta characters (values in 0200..0377) if you have an older shell. If you have a working echo, use printf(1): "`printf %s '\xxx\xxx\xxx'`" This still may not be able to name meta characters (depending again on the vagaries of your particular shell). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris