I want to pipe the output of a “template” file into MySQL, the file having variables like ${dbName} interspersed. What is the command line utility to replace these instances...
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 extract 3 fields (Number 2, 4...
I would like to update a large number of C++ source files with an extra include directive before any existing #includes. For this sort of task, I normally use...
In a Bash script, I want to pick out N random lines from input file and output to another file. How can this be done? 6 Answers 6
I have a file as below: line1 line2 line3 And I want to get: prefixline1 prefixline2 prefixline3 I could write a Ruby script, but it is better if I...
I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single...