Hi,
I would like to know How to use use sed for manipulating string for the following situation.
Basically my objective is to check validity of the filename in my shell script.
I am getting a parameter like this for my shell script.
Check my folder is having some space.
$1=/root/krishna mohan/file.txt
I am trying to use sed so that I can mutate the above file path like below and further use ls command.
/root/'krishna mohan'/file.txt
ls /root/'krishna mohan'/file.txt
Ofcourse I do know that I can use single quote in the begining and end.But I will have problems if I am getting above parameter with some mask/pattern like
/root/krishna mohan/file*.txt
Here keeping single quotes in the begining and end won't work.
Kindly suggest me the solution How to keep quotes for any text between / and / which has space.