Why does this sed does not work?
sed 's/DIRS = \[\]/ DIRS = \[os.path.join\(BASE_DIR, \'templates\',\'allauth\',\'account\'\)\]/' settings.py
running this just gives a ">" prompt (as if something is unterminated).
Why does this sed does not work?
sed 's/DIRS = \[\]/ DIRS = \[os.path.join\(BASE_DIR, \'templates\',\'allauth\',\'account\'\)\]/' settings.py
running this just gives a ">" prompt (as if something is unterminated).
Its because of your usage with ’
and ()
.
Although I don’t underdstand why have you complicated the expression so much, just use:
sed "s/DIRS = \[\]/ DIRS = [os.path.join(BASE_DIR, 'templates','allauth','account')]/" settings.py