Immediately following is a line of text that I wish to run through sed to have a couple things changed.
MSCT HATR/sgf-v1_1-3010-20080510-200727.dx* -> UDP 127.0.0.1
Using a script with sed ive been trying to get the letters "HATR" to be whatever I decide by using a "$1" after the script name when i start the script with no luck. I would also like to take the 4 digits that appear immediately after the "sgf-v1_1-" and alter the first digit from a 3 to a 6 and place it with a blank space after the last number in the line. So if I named this script alter and I had multple lines to ammend like the one above I would type
alter 25SEPTHATR and it would give me the following out:
MSCT 25SEPTHATR/sgf-v1_1-3010-20080510-200727.dx* -> UDP 127.0.0.1 6010
MSCT 25SEPTHATR/sgf-v1_1-3010-20080610-200727.dx* -> UDP 127.0.0.1 6010
MSCT 25SEPTHATR/sgf-v1_1-3011-20080510-200727.dx* -> UDP 127.0.0.1 6011
MSCT 25SEPTHATR/sgf-v1_1-3011-20080610-200727.dx* -> UDP 127.0.0.1 6011
Can anyone show me how Ive already done alot with sed to get the chages to this point just cant figure these last couple out?