This question is a derivative of the https://askubuntu.com/questions/601149/is-there-a-command-to-round-decimal-numbers-in-txt-files, which was successfully solved by using:
perl -i -pe 's/(\d*\.\d*)/...
awk newbie here.
Suppose I have two columns of data, and I want to calculate the rate of increase, given by delta(y)/delta(x). How would I do this in an awk script? What I've learnt so far only deals ...
That should be easy, just use [[ "$var" =~ '^[1-9][0-9]*$' ]]. But I don't get the behavior I expect excepted with zsh. I don't control the machine where the script will be run, so portability along ...
I'm trying to numerically sort every column individually in a very large file. I need the command to be fast, so I'm trying to do it in an awk command.
I want to get the exact number when I try to find the average of a column of values.
For example, this is the column of input values:
I can't seem to find a command that lets me delete duplicates in my file without creating a new file and also preserving the order of the contents in my file.
Would there be another command besides ...
I would like to convert a float to a ratio or fraction.
Do we have the option to convert a float 1.778 to ratio as 16:9 or 16/9 in bash, in a fashion similar to Python's fractions module (Fraction(1....
So I have a text file containing valid and invalid hexadecimal color codes. I want to be able to filter out the invalid codes and print just the valid ones. For a code to be valid it must have a hash ...
I currently have the following csv format, it's much larger but I've taken a chunk of it for now.
EN,"New York City","9....
I have a file containing the following list of numbers:
I would like to re-write this list of numbers ...
Have a field with distance data from GoPro. Need to concat the files together but the distance starts at 0 on each new csv file as video files are of only a set duration.
So how would it be possible ...
I have a file with 4 columns. First two columns are for x and y position (in integers) and third, fourth column for an arbitrary field value.
1 1 0.5 1.2
1 2 1.7 2.3
1 3 2.0 2.2
2 1 1.4 2.5
2 2 1.6 ...