Renaming Files Question

8 views
Skip to first unread message

Paul Boniol

unread,
Feb 15, 2022, 10:44:43 AM2/15/22
to NLUG
I am renaming (and will be moving) my MythTV files so Emby can figure them out.  However, I'm not understanding what is wrong with ones that have a single quote in the name.  One example of several:

mv -i 1062_20180509230000.ts 'Doctor Who S03E35 The Gunfighters Don\'t Shoot the Pianist - 2018-05-09_18-00-00.ts'

I thought the single quote method was easier than having to escape all the spaces, parentheses, etc that appear in the names..However I'm not figuring out the single quotes.  I tried to follow an example I found online but I can't make sense of it.

Paul

Kent Perrier

unread,
Feb 15, 2022, 10:52:06 AM2/15/22
to nlug...@googlegroups.com
I am guessing you are hitting the ' in the file name itself. 

If you tab complete the file name do you get something like this?

-rw-rw-r--.  1 kperrier kperrier    0 Feb 15 09:49 "file name'd with a quote in it"
[kperrier@kperrier tmp]$ mv 'file name'\''d with a quote in it'


If you use double quotes around the filename you don't need to escape anything. 

Kent

--
--
You received this message because you are subscribed to the Google Groups "NLUG" group.
To post to this group, send email to nlug...@googlegroups.com
To unsubscribe from this group, send email to nlug-talk+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en

---
You received this message because you are subscribed to the Google Groups "NLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nlug-talk+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nlug-talk/CAL9PgS3OeX9-om9iqhUoX2opiJSTGMXA1NJ6akkRK4iJ%3DGUyMQ%40mail.gmail.com.

Paul Boniol

unread,
Feb 15, 2022, 11:11:43 AM2/15/22
to NLUG
I had tried tab completing a file name that I changed manually. Earlier it didn't tab complete, but it does now.(maybe I mistyped something). Yes, that's what I get. And interesting on the double quotes. There are only a few that have " in them, so that's a much more manageable option.

Thank you!
Paul

Reply all
Reply to author
Forward
0 new messages