I have a file where data is present in below format :
cat file.txt 02|123 04|321 08|453 09|364 01|789 23|765 so here 02,04 ... represents Hour and 123,321 ... represents some random value.
I want to delete all the lines from this file where first two value is less than the current hour which will get from date +'%H'.
Suppose current hour is 10 so i want to delete lines containing first two less than 10 i.e
02|123 04|321 08|453 09|364 01|789
awk -F "|"to specify your field delimiter and compare the$1to the current hour as in that answer