[Solved] Append text to each of multiple lines in file

Use something simple like sed: sed -r ‘s/^([0-9]*)$/update “table1” set event_type = \’NEW\’ where id=\1/’ file | write back using \1 as placeholder catch digits in the file Previous answer I used an approach based on bash loops, whereas it is a bit overkilling. See a related question: Why is using a shell loop to … Read more

[Solved] How to decrypt the c program?

It sounds like you are using Vi as your editor (:x is a bit of a give-away). From this page: Crypt Open the file using vi, type :XEnter, enter the key (this key will be the password to see the crypted file) and then save and exit with :wqEnter. The file will be crypted. You … Read more