New answers tagged

1

sed -i -e '/Leonardo/ s/$/ Narnie/' database_readers.txt This uses sed's in-place edit option (-i) to search for all lines matching the regexp Leonardo, and replace the end-of-line anchor ($) with a single space and the word Narnie. This effectively appends the Narnie to the end of the matching lines. Be careful with the regexp search pattern - it's easy ...


3

Your line: psql -U postgres -d ebay_sold -c "UPDATE test_table SET title = regexp_replace(title, '"', '', 'g')" is the problem. You open a double-quoted string at "UPDATE, but it is closed earlier than you think it is, causing you to attempt to run the following as SQL: UPDATE test_table SET title = regexp_replace(title, ' This is clearly not valid. ...



Top 50 recent answers are included