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 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
The scenario is I want to comment out the last occurrence of a word in shell script using sed.
Assume I have temp.sh with the following content:
Abc 123 Abc
I want to replace ...
I have two CSV files.
One is long with columns: Chr_Name, h, j, start_pos, end_pos.
Another is short file including columns Chr_Name and position.
I need to filter the rows from the first file based ...
I want to make edits containing meta characters. Here https://stackoverflow.com/questions/29613304/is-it-possible-to-escape-regex-metacharacters-reliably-with-sed one of solutions is via perl with s\Q ...
Is there an easy way to have arbitrary text editors call special logic based on a file extension?
For example, let's say I had a zip file that had a collection of files.
I want to copy column NAME to column NAME-LOWERCASE. NAME-LOWERCASE should only contain lowercase letters. The uppercase should be untouched in all column expect NAME-LOWERCASE
I have a file in txt format that I want to convert to csv. Between each field there are blocks of spaces. The amount of spaces is not the same between every field.
Is there a command with sed or awk ...
I have a CSV file with thousands of lines like these
The accepted wisdom for the past few decades has been that it is never a good idea to parse the output of ls (,). For example, if I want to save a file's modification date along with its name ...
I am trying to:
Always add 0 0 0 to the first row of the file.
Multiply 2*pi or 6.2832 to the first column of a three-column file formatted similar below, but only if the line begins with a numeral. ...
I have a CSV file with only 2 columns (but lots of rows) and the occasional irregular row which always starts with an asterisk (*) character and may span more than two columns. Using just the Linux ...