I'm banging my head on this problem: can we process apostrophes AND
spaces at the same time in the same string?
My practical situation is as follows:
for the sake of argument, let's say I have a song, in ogg format, named
"O'Connor's Song". The file name is thus: OConnor's Song.ogg
I am trying to fit that as a line in aemenu. (Aemenu is a stand-alone
component of the aewm window manager.)
The structure of this menu has to be as follows:
cmd title executable
We can also have:
cmd "Longer Title" "executable some-parameter"
Back to my fictitious example, to incorporate O'Connor's Song in this
structure, I must use the form:
Code: Select all
cmd "O'Connor's Song" "play O'Connor's Song.ogg"
I can solve the spaces problem by writing this:
Code: Select all
cmd "O'Connor's Song" "play 'O'Connor's Song.ogg'"
This is where I am stumped. The piece will not play because there are
apostrophes in the parameter for the executable: "O'Connor's". Play does
not find the song, 'O', obviously, because I have used the apostrophe as
delimiter.
It's as if we cannot compensate for spaces AND apostrophes in the same
string at the same time.
If anyone can shed some light on this subject, I'll be grateful.
BFN.