Re: How to escape this for the bash shell...

1999-08-07 Thread Lex Chive
On Wed, Aug 04, 1999 at 03:08:55PM -0500, Michael Merten wrote:
 On Wed, Aug 04, 1999 at 03:08:20PM +0300, Alex Shnitman wrote:
  On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
  
   I have a file named :
   
   ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
   
   ... in my home directory. 
   
   I am wondering how to escape this properly for rm to work on it in
   bash.
  
  Most people told you to rm ./file or rm 'file' but that won't work of
  course since you can't input the filename from the keyboard at
  all. (The name as you typed it looks like it consists of escape
  sequences, not something you can easily type on the keyboard.) So it's
  a better idea to use the shell's wildcard expansion to do the work for
  you. You can type rm -i * and then answer n for every file except for
  this one.
 
 It does look like escape sequences, but what key would produce ?[4~
 ... the closest I can find is PgDn which produces ^[[4~.  Is there
 a table/chart/listing of these somewhere for a linux term?
 
the ? means unprintable character, and is probably really a ^[ (aka \e) (but
the shell cant print it). you cant know what the first chars are though. the
rm -i thing is the easiest (well here you could also use rm *[4~ since this is
not likely to match another name). when there are too many files you can also
use ls -i, then find. i guess this must be explained in every unix faq.

-lex


pgpX20CANhAAw.pgp
Description: PGP signature


Re: How to escape this for the bash shell...

1999-08-05 Thread Colin Marquardt
* Michael Merten [EMAIL PROTECTED] writes:

 It does look like escape sequences, but what key would produce ?[4~
 ... the closest I can find is PgDn which produces ^[[4~.  Is there
 a table/chart/listing of these somewhere for a linux term?

console_codes(4), but I donĀ“t know how the codes mentioned there
translate to that here.

-- 
Colin Marquardt [EMAIL PROTECTED]


How to escape this for the bash shell...

1999-08-04 Thread Nate Duehr
I have a file named :

?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~

... in my home directory. 

I am wondering how to escape this properly for rm to work on it in
bash.

Someone suggested using Midnight Commander, but it doesn't even list
it as showing up in the directory, so it obviously doesn't know what to
do with it either! 

Any shell-heads out there want to take a stab at it?  It's not really
bothering me, but it's just sitting there at the top of every 'ls'...
(:


-- 
+---++
| Nate Duehr - [EMAIL PROTECTED]| Support Amateur Radio  Linux! |
| Private Pilot, Telephony Engineer |  Ham Callsign: N0NTZ   |
| UNIX Hack, Perl Hack, Tech-Freak  |  Grid Square: DM79 |
| http://www.natetech.com   | May the Source be with you.  |
+---++
| HamRadio and Linux mailing lists available for interested parties: |
|http://www.natetech.com/mailman/listinfo|
++


Re: How to escape this for the bash shell...

1999-08-04 Thread Mark Wagnon
Nate Duehr wrote:
 
 I have a file named :
 
 ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 ... in my home directory.
 

have you tried 'rm ./FILE'? There are several ways to delete
files with weird filenames.

There was a thread on it last month. Take a look at:

 
http://www.debian.org/Lists-Archives/debian-user-9907/msg00289.html

and follow that thread. BTW, it's entitled Remove funny files

hth
-- 
 __   _
Mark Wagnon Debian GNU/ -o) / /  (_)__  __   __
Chula Vista, CA /\\/ /__/ / _ \/ // /\ \/ /   
[EMAIL PROTECTED]  _\_v/_/_//_/\_,_/ /_/\_\
  http://www.debian.org


Re: How to escape this for the bash shell...

1999-08-04 Thread Michael Merten
On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
 I have a file named :
 
 ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 ... in my home directory. 
 
 I am wondering how to escape this properly for rm to work on it in
 bash.
 
 

For this one, I'd just enclose the filename in single quotes like
   rm 'file'
which should prevent shell interpretation of the ~,? and [
characters.

Mike

[Private mail welcome, but no need to CC: me on list replies.]

--
Michael Merten
  --- E-Mail: [EMAIL PROTECTED]
  --- NRA Life Member -- http://www.nra.org
  --- Debian GNU/Linux Fan -- http://www.debian.org
  --- CenLA-LUG Founder -- http://www.angelfire.com/la2/cenlalug
--
I just thought of something funny...your mother.
 --Cheech Marin


Re: How to escape this for the bash shell...

1999-08-04 Thread Ludovic Paquet


Nate Duehr wrote:
I have a file named :
?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
... in my home directory.
I am wondering how to escape this properly for rm to work on it in
bash.
Someone suggested using Midnight Commander, but it doesn't even list
it as showing up in the directory, so it obviously doesn't know what
to
do with it either!
Any shell-heads out there want to take a stab at it? It's not
really
bothering me, but it's just sitting there at the top of every 'ls'...
(:
--
+---++
| Nate Duehr - [EMAIL PROTECTED] | Support Amateur
Radio  Linux! |
| Private Pilot, Telephony Engineer | Ham Callsign: N0NTZ
|
| UNIX Hack, Perl Hack, Tech-Freak | Grid Square: DM79
|
| http://www.natetech.com
| "May the Source be with you." |
+---++
| HamRadio and Linux mailing lists available for interested parties:
|
| 
http://www.natetech.com/mailman/listinfo
|
++
--
Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED]
 /dev/null
have you tried "rm \?\?\?\?\?\[4~\?\[4~\?\[4~\?\[4~\?\[4~\?\[4~\?\[4~\?\[4~\?\[4~\?\[4~"
--
 \\\//
 / _ _ \
 ( O O )
===oOOO=(_)=OOOo===
PAQUET Ludovic

 e-mail : [EMAIL PROTECTED]

 telephone : 05-46-88-41-80
===Oooo.===
 .oooO ( )
 ( ) ) /
 \ ( (_/
 \_)



Re: How to escape this for the bash shell...

1999-08-04 Thread Shao Zhang
have you tried 

rm ./?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~


On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
 I have a file named :
 
 ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 ... in my home directory. 
 
 I am wondering how to escape this properly for rm to work on it in
 bash.
 
 Someone suggested using Midnight Commander, but it doesn't even list
 it as showing up in the directory, so it obviously doesn't know what to
 do with it either! 
 
 Any shell-heads out there want to take a stab at it?  It's not really
 bothering me, but it's just sitting there at the top of every 'ls'...
 (:
 
 
 -- 
 +---++
 | Nate Duehr - [EMAIL PROTECTED]| Support Amateur Radio  Linux! |
 | Private Pilot, Telephony Engineer |  Ham Callsign: N0NTZ   |
 | UNIX Hack, Perl Hack, Tech-Freak  |  Grid Square: DM79 |
 | http://www.natetech.com   | May the Source be with you.  |
 +---++
 | HamRadio and Linux mailing lists available for interested parties: |
 |http://www.natetech.com/mailman/listinfo|
 ++
 
 
 -- 
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null
 
 

-- 

Shao Zhang - Running Debian 2.1  ___ _   _
Department of Communications/ __| |_  __ _ ___  |_  / |_  __ _ _ _  __ _ 
University of New South Wales   \__ \ ' \/ _` / _ \  / /| ' \/ _` | ' \/ _` |
Sydney, Australia   |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: [EMAIL PROTECTED]  |___/ 
_


Re: How to escape this for the bash shell...

1999-08-04 Thread Mirek Kwasniak
On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
 I have a file named :
 
 ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 ... in my home directory. 
 
 I am wondering how to escape this properly for rm to work on it in
 bash.
 
 Someone suggested using Midnight Commander, but it doesn't even list
 it as showing up in the directory, so it obviously doesn't know what to
 do with it either! 
 

Hi,

rm 'your_file_name'

mc doesn't list this file because it last char is ~ and mc interprets this
files as backup. You can set in mc

Options-Configuration...-show Backup files

to see files *~ and

Options-Configuration...-show Hidden files

to see files .*

Mirek


Re: How to escape this for the bash shell...

1999-08-04 Thread Alex Shnitman
On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:

 I have a file named :
 
 ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 ... in my home directory. 
 
 I am wondering how to escape this properly for rm to work on it in
 bash.

Most people told you to rm ./file or rm 'file' but that won't work of
course since you can't input the filename from the keyboard at
all. (The name as you typed it looks like it consists of escape
sequences, not something you can easily type on the keyboard.) So it's
a better idea to use the shell's wildcard expansion to do the work for
you. You can type rm -i * and then answer n for every file except for
this one.


-- 
Alex Shnitman| http://www.debian.org
[EMAIL PROTECTED], [EMAIL PROTECTED]   +---  
http://alexsh.hectic.netUIN 188956PGP key on web page
   E1 F2 7B 6C A0 31 80 28  63 B8 02 BA 65 C7 8B BA

/real/ kernel hackers
dd if=/dev/urandom of=/vmlinuz
and influence the Universal Randomosity Field.
-- Gaal Yahas


pgpEiZGQ47WHo.pgp
Description: PGP signature


Re: How to escape this for the bash shell...

1999-08-04 Thread David Wright
Quoting Alex Shnitman ([EMAIL PROTECTED]):
 On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
 
  I have a file named :
  
  ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
  
  ... in my home directory. 
  
  I am wondering how to escape this properly for rm to work on it in
  bash.
 
 Most people told you to rm ./file or rm 'file' but that won't work of
 course since you can't input the filename from the keyboard at
 all. (The name as you typed it looks like it consists of escape
 sequences, not something you can easily type on the keyboard.) So it's
 a better idea to use the shell's wildcard expansion to do the work for
 you. You can type rm -i * and then answer n for every file except for
 this one.

In the general case, I think you still need the ./* in case you have
files called -d etc. which would generate undesirable option switches.

I would also assume that rm -i ./*4~ could speed things up. Where the
file name at least starts with printable characters, recognition (tab)
can also help as it automatically inserts the necessary backslashes.

Cheers,

-- 
Email:  [EMAIL PROTECTED]   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.


Re: How to escape this for the bash shell...

1999-08-04 Thread Eberhard Burr
Nate Duehr [EMAIL PROTECTED] writes:

 I have a file named :
 
 ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 ... in my home directory. 
 
 I am wondering how to escape this properly for rm to work on it in
 bash.

bash will properly escape it if you use file-name completion. Thus if
you type ? and then tab after the command you'd like to operate on
that file, bash will complete the name (unless you have other files
beginning with ? too).

 Someone suggested using Midnight Commander, but it doesn't even list
 it as showing up in the directory, so it obviously doesn't know what to
 do with it either! 

Are you sure it's a file at all? It looks more like a misconfigured
ls. Does the file show up in your $HOME only or in every directory?

Regards,
-- 
Eberhard Burrcheck http://www.uni-karlsruhe.de/~Eberhard.Burr/publickey.asc
 for PGP Key -- #include stddisc.h -- electric cookie follows
BARRY ... That was the most HEART-WARMING rendition of I DID IT MY
WAY I've ever heard!!


Re: How to escape this for the bash shell...

1999-08-04 Thread Nathan Duehr
This worked.  I feel silly... that was TOO simple.

Thanks Shao.  

p.s. Using single-quotes didn't work, unless I misread and it was supposed
to be single-backquotes?

On Wed, 4 Aug 1999, Shao Zhang wrote:

 have you tried 
 
 rm ./?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
 
 
 On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
  I have a file named :
  
  ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
  
  ... in my home directory. 
  
  I am wondering how to escape this properly for rm to work on it in
  bash.
  
  Someone suggested using Midnight Commander, but it doesn't even list
  it as showing up in the directory, so it obviously doesn't know what to
  do with it either! 
  
  Any shell-heads out there want to take a stab at it?  It's not really
  bothering me, but it's just sitting there at the top of every 'ls'...
  (:
  
  
  -- 
  +---++
  | Nate Duehr - [EMAIL PROTECTED]| Support Amateur Radio  Linux! |
  | Private Pilot, Telephony Engineer |  Ham Callsign: N0NTZ   |
  | UNIX Hack, Perl Hack, Tech-Freak  |  Grid Square: DM79 |
  | http://www.natetech.com   | May the Source be with you.  |
  +---++
  | HamRadio and Linux mailing lists available for interested parties: |
  |http://www.natetech.com/mailman/listinfo|
  ++
  
  
  -- 
  Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null
  
  
 
 -- 
 
 Shao Zhang - Running Debian 2.1  ___ _   _
 Department of Communications/ __| |_  __ _ ___  |_  / |_  __ _ _ _  __ _ 
 University of New South Wales   \__ \ ' \/ _` / _ \  / /| ' \/ _` | ' \/ _` |
 Sydney, Australia   |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
 Email: [EMAIL PROTECTED]  
 |___/ 
 _
 

+---++
| Nate Duehr - [EMAIL PROTECTED]| Support Amateur Radio  Linux! |
| Private Pilot, Telephony Engineer |  Ham Callsign: N0NTZ   |
| UNIX Hack, Perl Hack, Tech-Freak  |  Grid Square: DM79 |
|   | May the Source be with you.  |
+---++
| HamRadio and Linux mailing lists available for interested parties: |
|http://www.natetech.com/mailman/listinfo|
++


Re: How to escape this for the bash shell...

1999-08-04 Thread Michael Merten
On Wed, Aug 04, 1999 at 03:08:20PM +0300, Alex Shnitman wrote:
 On Wed, Aug 04, 1999 at 01:22:17AM -0600, Nate Duehr wrote:
 
  I have a file named :
  
  ?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~?[4~
  
  ... in my home directory. 
  
  I am wondering how to escape this properly for rm to work on it in
  bash.
 
 Most people told you to rm ./file or rm 'file' but that won't work of
 course since you can't input the filename from the keyboard at
 all. (The name as you typed it looks like it consists of escape
 sequences, not something you can easily type on the keyboard.) So it's
 a better idea to use the shell's wildcard expansion to do the work for
 you. You can type rm -i * and then answer n for every file except for
 this one.

It does look like escape sequences, but what key would produce ?[4~
... the closest I can find is PgDn which produces ^[[4~.  Is there
a table/chart/listing of these somewhere for a linux term?

Mike

[Private mail welcome, but no need to CC: me on list replies.]

--
Michael Merten
  --- E-Mail: [EMAIL PROTECTED]
  --- NRA Life Member -- http://www.nra.org
  --- Debian GNU/Linux Fan -- http://www.debian.org
  --- CenLA-LUG Founder -- http://www.angelfire.com/la2/cenlalug
--
Any member introducing a dog into the Society's premises shall be
liable to a fine of one pound.  Any animal leading a blind person
shall be deemed to be a cat.
 -- Rule 46, Oxford Union Society, London