Registered Member
|
OK, it probably is a "cilly" question, but believe me, I have groogled* around for hours.
I have a service menu that passes the absolute path of the Dolphin entry to a bash script. It works just fine... for me Meaning, it passes /home/me/thatdirectory to the script, which means, on my machine, it's just fine. But if I send the script to my friend, it will use /home/me/thatdirectory when it should be /home/he/thatdirectory. So how would I turn /home/myuser to ~/ ? * Groogling is what pigs do when rummaging around in the dirt for scraps of food - in an obscure Betelgeusian dialect, as translated by the babel fish. |
Registered Member
|
This has nothing to do with Dolphin , but /home/myuser = ~
Or, better for scripting, don't use absolute paths use variables like $HOME You may want to look at bash tutorials for more info
claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
|
Registered Member
|
But it has to do with Dolphin.
The Dolphin service menu will pass the absolute path to the script. I have been perusing bash tutorials, service menu tutorials, and forums for hours, and found no way to pass either a relative path or one with $HOME. |
Registered Member
|
Actually, it's just lack of sleep. I realised that - of course - my friend can use the absolute path because on his system the service menu will pass the correct one to his script.
Apologies |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]