8
I have the following occurrence:
DirUpload=/var/log
find $DirUpload | sed 's/$DirUpload//g'
The question is, how to use variable along with sed?
8
I have the following occurrence:
DirUpload=/var/log
find $DirUpload | sed 's/$DirUpload//g'
The question is, how to use variable along with sed?
6
According to the response of Soen:
DirUpload=/var/log
find $DirUpload | sed "s|$DirUpload\/||g"
/
(in the example: |
)3
Just use double quotes instead of single quotes:
DirUpload=/var/log
find $DirUpload | sed "s/$DirUpload//g"
Browser other questions tagged bash shell
You are not signed in. Login or sign up in order to post.
In doing so ai gives the following return: (sed: -e expression #1, char 9: Unknown option to `s')
– Fábio Jânio
What you’re looking to replace in the files he finds ?
– Roknauta