bash: how to replace symbols inside the file with filename
hi
the question is how to replace some symbols (for example @@@) inside of the group of files with its filenames? i supposed that it should be something like this: for i in * do sed 's/^@@@=.*/$i/g' $i done but such a cycle writes just symbols "$i" not the filename. is such a solving possible in general without making any complicated scripts? |
If you are trying to use a bash variable with sed, and that is your problem, use double quotes instead of single quotes.
E.g. Code:
search=foo |
big thanks! it really works :)
|
All times are GMT -5. The time now is 05:09 PM. |