0

I want to use this command:

sed 's/account.db/$PATH/' file1 > file2

and

sed 's/account.db/$PATH.account.db/' file3 > file4

But I dont know how to use it.

Zanna
  • 69,223
  • 56
  • 216
  • 327
ahmad
  • 195
  • 12
  • Replace your single quotes with double quotes. (see [Difference between single and double quotes in Bash](http://stackoverflow.com/questions/6697753/difference-between-single-and-double-quotes-in-bash)) – David Myers Mar 03 '17 at 20:38
  • @Zanna i changed ' by " but it has error – ahmad Mar 03 '17 at 20:38
  • @Zanna this error:sed: -e expression #1, char 15: unknown option to `s' – ahmad Mar 03 '17 at 20:40
  • You need to use a different delimiter because the PATH contains `/` characters. Do it like this `sed "s#foo#$bar#"` (oops the PATH has colons too!) – Zanna Mar 03 '17 at 20:41

0 Answers0