POSIX Shell Programming Challenge - Programming On Unix
Users browsing this thread: 3 Guest(s)
|
|||
(15-04-2021, 09:32 PM)phillbush Wrote: Another challenge, if you don't mind.Yes please! (15-04-2021, 09:32 PM)phillbush Wrote: what if $HOME contains a comma? Real men don't use sed! (ಠ_ಠ) Code: $ FAKEPWD=/home/user,with,commas/tmp Just kidding of course. I hope I understood your problem correctly, but according to my simulation this seems to be working as you can see. Edit: Almost forgot to mention, this just assumes you actually are somewhere inside $HOME, since it just crudly adds '~' to the start and cuts out $HOME.... |
|||