LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-12-2007, 04:25 PM   #1
sysslack_linux
LQ Newbie
 
Registered: Oct 2007
Location: Sweden
Distribution: I favor Slackware, CentOS and Debian
Posts: 25

Rep: Reputation: Disabled
bash completion matching weird letters?


Hallo
I have a challenge with names that gets renamed without my permission to something like Vaktm¤stare
How can I match them with bash completion so I can rename them to
something more apropriate?
This letter I believe is the spanish  as far as I am concerned.

Thanks in advance :-)
 
Old 12-12-2007, 04:36 PM   #2
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Rep: Reputation: 108Reputation: 108
Hya,

What happens
Code:
>mv Vakt [tab]
Do you have many of them?

Similar thing happened to my penguin last night, it was escape sequence, so it was hard.

Happy Penguins!

Last edited by kaz2100; 12-12-2007 at 04:37 PM. Reason: typo
 
Old 12-12-2007, 04:58 PM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
What is the output of "ls Vaktm*stare"? If it outputs that file then "mv Vaktm*stare more_appropriate".

HTH

Forrest

Last edited by forrestt; 12-12-2007 at 04:59 PM.
 
Old 12-13-2007, 02:54 AM   #4
sysslack_linux
LQ Newbie
 
Registered: Oct 2007
Location: Sweden
Distribution: I favor Slackware, CentOS and Debian
Posts: 25

Original Poster
Rep: Reputation: Disabled
Thank You!
I know the basics
But this is specially!To be specific this is the
name of the file, and I can't figure how to match !


Vaktmästare Fastighetsskötare_ HOTEL KARLAPLAN AB.doc

I would like the new name to be

Vaktmaster.doc
 
Old 12-13-2007, 05:44 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Does this command display the long name - and only that file?
Code:
echo "Vaktm*HOTEL*.doc"
If it does, you should be able to use this command to rename the file:
Code:
mv Vaktm*HOTEL*.doc Vaktmaster.doc
 
Old 12-13-2007, 02:00 PM   #6
sysslack_linux
LQ Newbie
 
Registered: Oct 2007
Location: Sweden
Distribution: I favor Slackware, CentOS and Debian
Posts: 25

Original Poster
Rep: Reputation: Disabled
Yes!!!
You are a genius

Curious
Why did that work?

I heard before that you could use this:

something like this ./* something

Last edited by sysslack_linux; 12-13-2007 at 02:04 PM.
 
Old 12-13-2007, 02:03 PM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
That's what I was saying as well. I didn't know the real filename (so I used the one you gave me). It works because * matches anything. What you are saying is:

mv Vaktm[anycharacters]HOTEL[anycharacters].doc Vaktmaster.doc

HTH

Forrest
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tab-Completion in bash script Buto Linux - General 1 12-04-2007 06:50 PM
bash: How do I disable programmable completion Ghodmode Linux - General 2 09-05-2007 12:59 AM
xterm and bash completion athanatos Slackware 12 07-22-2006 12:47 PM
question about bash completion Guest1234 Linux - Software 4 02-25-2006 04:09 PM
auto-completion in bash with wildcards juanbobo Linux - Software 2 04-07-2005 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration