I'm trying to get rid of all paths that include the current directory, so I did
my_command | sed "s/%CD%//ig"
in the command prompt, but it didn't work -- everything came out just like before.
How would I make it work?
|
|
|
The problem with your command is that the backslashes are treated as escape characters, not literal backslashes. You can overcome this by storing the escaped directory name in an auxiliary variable
(If used in a batch file, replace every You can use
|
||||
|