AFAIC both sed and awk are general purpose text processing utilities with whom a user can get quite similar results, in a slightly different syntax:
With both, a user could add, replace/translate and ...
I have a script that accesses multiple dat files and produce csv files based on previous day’s data. these DAT files are updated on per minute bases with data from various instruments.
Given a file like this:
a foo 1
b bar 2
c foo 3
d baz 4
e bar 5
I want to modify that file as follows: copy every line containing bar to the following line and change bar to bar2, so that the result ...
Some lines start with a #, then any number (one or more digits), then =. Those lines starting with hash, remove text from beginning of line up to equal sign (including it).
Example in file:
I have a big text file (~50Gb when gz'ed). The file contains 4*N lines or N records; that is every record consists of 4 lines. I would like to split this file into 4 smaller files each sized roughly ...
I have a certificate file which has 2 certificates in it. Starts with ---BEGIN CERTIFICATE-- and ends with ---END CERTIFICATE----.
I have a tsv file with tab-separated columns. I want to obtain the 5th column, which has space-separated values. Convert the space-separation to tab-separation and save as a new file.
I have a text file with accounts like:
Paid 100 15/02/2022 3000
recd 50 15/02/2022 nelur trip 3050
PAID 80 25/03/2022 Adjusted towards trip 3130
14 PAID 50 26/03/2022 Given to Nate Cash (...
My Input file looks like this..
I want my script output to be like this:
START line1 line2 line3 END
START line11 line22 line33 END
I have heard that printf is better than echo. I can recall only one instance from my experience where I had to use printf because echo didn't work for feeding some text into some program on RHEL 5.8 ...
I want to delete specific two consecutive lines matching patterns from specific line from a file.
For e.g. file contents are like below.
Line4: Name: 123
I have a csv file with different revenues. I want to sort the csv file on revenue from high to low value. I can't find how to do this in terminal without the use of python.
I don't want to use python.
I need to find the API response time from an Apache log file. It's like a response time which is takes between 1 to 2 secound or 2 to 3 second. $6 is response time and values comes in microseconds.
I want to see the dependencies for one or more targets of a makefile. So I am looking for a program that can parse makefiles and then will represent the dependencies in some tree-like format (...