First, I have the following tab delimited file:
155.66.220.46 NTADTH0791M00 None wst None "Smith, Scott" 3786
123.66.201.12 NTADTH0802M00 None WST None "Smith, Scott" 4607 "Thomas, John"
166.67.201.13 NTADTH0803M00 None WST None "Smith, Scott" 4607 "Thomas, John"
111.30.220.109 NTADTH0904M00 Standard; Prime Shift Monitoring WST None
189.30.221.148 NTADTH0965M00 Standard; Prime Shift Monitoring WST None
I would like to strip off the first tab delimited field using 'sed', so the file would look like this:
NTADTH0791M00 None wst None "Smith, Scott" 3786 "Thomas, John" 1032
NTADTH0802M00 None WST None "Smith, Scott" 4607 "Thomas, John" 3786 SAN
NTADTH0803M00 None WST None "Smith, Scott" 4607 "Thomas, John" 3786 SAN
NTADTH0904M00 Standard; Prime Shift Monitoring WST None "Thomas, John"
NTADTH0965M00 Standard; Prime Shift Monitoring WST None "Thomas, John" 3786
Secondly, how could I swap the first two fields using 'sed' from the file on top so it would look like this:
NTADTH0791M00 155.66.220.46 None wst None "Smith, Scott" 3786
NTADTH0802M00 123.66.201.12 None WST None "Smith, Scott" 4607 "Thomas, John"
NTADTH0803M00 166.67.201.13 None WST None "Smith, Scott" 4607 "Thomas, John"
NTADTH0904M00 111.30.220.109 Standard; Prime Shift Monitoring WST None
NTADTH0965M00 189.30.221.148 Standard; Prime Shift Monitoring WST None "Thomas, John"
thanks
155.66.220.46 NTADTH0791M00 None wst None "Smith, Scott" 3786
123.66.201.12 NTADTH0802M00 None WST None "Smith, Scott" 4607 "Thomas, John"
166.67.201.13 NTADTH0803M00 None WST None "Smith, Scott" 4607 "Thomas, John"
111.30.220.109 NTADTH0904M00 Standard; Prime Shift Monitoring WST None
189.30.221.148 NTADTH0965M00 Standard; Prime Shift Monitoring WST None
I would like to strip off the first tab delimited field using 'sed', so the file would look like this:
NTADTH0791M00 None wst None "Smith, Scott" 3786 "Thomas, John" 1032
NTADTH0802M00 None WST None "Smith, Scott" 4607 "Thomas, John" 3786 SAN
NTADTH0803M00 None WST None "Smith, Scott" 4607 "Thomas, John" 3786 SAN
NTADTH0904M00 Standard; Prime Shift Monitoring WST None "Thomas, John"
NTADTH0965M00 Standard; Prime Shift Monitoring WST None "Thomas, John" 3786
Secondly, how could I swap the first two fields using 'sed' from the file on top so it would look like this:
NTADTH0791M00 155.66.220.46 None wst None "Smith, Scott" 3786
NTADTH0802M00 123.66.201.12 None WST None "Smith, Scott" 4607 "Thomas, John"
NTADTH0803M00 166.67.201.13 None WST None "Smith, Scott" 4607 "Thomas, John"
NTADTH0904M00 111.30.220.109 Standard; Prime Shift Monitoring WST None
NTADTH0965M00 189.30.221.148 Standard; Prime Shift Monitoring WST None "Thomas, John"
thanks