Posts

Showing posts from August 29, 2018

SED command to comment all the lines except the one's that matched the pattern

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite I have the below cron.txt file 58 18 * * 1-5 /usr/home/script.sh REP CXC BS TODAY all 1>/dev/null 2>/dev/null 00 19 * * 1-5 /usr/home/script.sh DSC DXC BUS TODAY all 1>/dev/null 2>/dev/null 01 19 * * 1-5 /usr/home/script.sh REP HP SNT TODAY all 1>/dev/null 2>/dev/null 03 19 * * 1-5 /usr/home/script.sh DSC CXC SNT TODAY all 1>/dev/null 2>/dev/null 32 10 * * 1-5 /usr/home/script.sh Check CXC OD TODAY MGLA 1>/dev/null 2>/dev/null 32 12 * * 1-5 /usr/home/script.sh Sca CXC OD TODAY all "01 03 05 07 08 10 12 17 18 19 31 32 33 37 42 50 53 55 57 84 89 93" 1>/dev/null 2>/dev/null 01 19 * * 1-5 /usr/home/script.sh REP HK SNT TODAY all 1>/dev/null 2>/dev/null 01 19 * * 1-5 /usr/home/script.sh REP RAM SNT TODAY all 1>/dev/null 2>/dev/null 01 19 * * 1-5 /usr/home/script.sh REP SAB SNT TODAY all 1>/dev/null 2>/dev/null And I need to comment (add # ) at the beginni