Iterate over $PATH variable using shell script

Iterate over $PATH variable using shell script

If I type echo $PATH in the terminal I get the following result:
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/fnorbert/.local/bin:/home/fnorbert/bin

I want to iterate over these paths using a shell script, but I do … Read more

Calendar calculations in bash

Calendar calculations in bash

I want to do some calendar manipulations in bash – specifically, I want to figure out the last date of a given month (including leap-year, and a preparing a table for … Read more

removing duplicate lines from file /grep

removing duplicate lines from file /grep

I want to remove all lines where all the second column 05408736032 are same
0009300|05408736032|89|01|001|0|0|0|1|NNNNNNYNNNNNNNNN|asdf| 0009367|05408736032|89|01|001|0|0|0|1|NNNNNNYNNNNNNNNN|adff|
these lines are not consecutive. Its fine to remove all the lines . … Read more