How to replace ${} placeholders in a text file?
I want to pipe the output of a “template” file into MySQL, the file having variables like ${dbName} interspersed. What is the command … Read more
I want to pipe the output of a “template” file into MySQL, the file having variables like ${dbName} interspersed. What is the command … Read more
How do you convert all text in Vim to lowercase? Is it even possible? 10 Answers 10
I have a file which contain following lines: /logs/tc0001/tomcat/tomcat7.1/conf/catalina.properties:app.env.server.name = demo.example.com /logs/tc0001/tomcat/tomcat7.2/conf/catalina.properties:app.env.server.name = quest.example.com /logs/tc0001/tomcat/tomcat7.5/conf/catalina.properties:app.env.server.name = www.example.com In above output I want to … Read more
I would like to update a large number of C++ source files with an extra include directive before any existing #includes. For this … Read more
In a Bash script, I want to pick out N random lines from input file and output to another file. How can this … Read more
I have a file as below: line1 line2 line3 And I want to get: prefixline1 prefixline2 prefixline3 I could write a Ruby script, … Read more
I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file … Read more