How to replace an entire line in a text file by line number
I have a situation where I want a bash script to replace an entire line in a file. The line number is always … Read more
I have a situation where I want a bash script to replace an entire line in a file. The line number is always … Read more
I have a text file with the following format. The first line is the “KEY” and the second line is the “VALUE”. KEY … Read more
I have a script file which I need to modify with another script to insert a text at the 8th line. String to … Read more
I want to remove some n lines from the end of a file. Can this be done using sed? For example, to remove … Read more
Suppose I have a file with lines aaa=bbb Now I would like to replace them with: aaa=xxx I can do that as follows: … Read more
I have a large file A (consisting of emails), one line for each mail. I also have another file B that contains another … Read more
I’d like edit a file with sed on OS X. I’m using the following command: sed ‘s/oldword/newword/’ file.txt The output is sent to … Read more
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions about general computing hardware … Read more
I need to add the following line to the end of a config file: include “/configs/projectname.conf” to a file called lighttpd.conf I am … Read more
I’m trying to replace a string in a Makefile on Mac OS X for cross-compiling to iOS. The string has embedded double quotes. … Read more