Hi
I have the following file on Unix where i need to extract the USER=<name> string, eg USER=boma1508 into a seperate file so we can look at the usernames stored in the log :
31-MAY-2004 17:52:23 *
(CONNECT_DATA=(SERVICE_NAME=HRP036A.pb.astra.COM)(CID=(PROGRAM=BUSOBJ.EXE)(HOST=MADWMA31)(USER=boma1508))
) * (ADDRESS=(PROTOCOL=tcp)(HOST=129.214.173.174)(PORT=1134)) * establish * * 0
31-MAY-2004 17:52:39 *
(CONNECT_DATA=(SERVICE_NAME=HORIP036A.pb.astra.COM)(CID=(PROGRAM=BUSOBJ.EXE)(HOST=MADWMA31)(USER=PJC1508))
) * (ADDRESS=(PROTOCOL=tcp)(HOST=129.244.113.174)(PORT=1335)) * establish *
31-MAY-2004 17:59:06 * (CONNECT_DATA=SERVICE_NAME=pb.astra.COM)(CID=PROGRAM=C:\ProgramFiles\Business Objects\Server\B
roadcast Agent 5.0\BcsScdul.exe)(HOST=CGTSAPP220)(USER=SVC_BusObj))) * (ADDRESS=(PROTOCOL=tcp)(HOST=165.15.33.147)(PORT=1192)) * establish * HORP036A.pb.astra.COM * 0
31-MAY-2004 17:59:07 *
(CONNECT_DATA=(SERVICE_NAME=HAORP036A.pb.astra.COM)(CID=(PROGRAM=C:\Program Files\Business Objects\Server\B
roadcast Agent 5.0\BcsScdul.exe)(HOST=CGTSAPP220)(USER=SVC_BusObj))) *
(ADDRESS=(PROTOCOL=tcp)(HOST=125.65.33.147)(PORT=1193)) * establish * HOIRP036A.pb.astra.COM * 0
The USER portion exists at different character postions on each line, and the log has over 50,000 lines, so can anyone recommend a way to achieve this?, the command if possible would be great! I have looked at Vi and sed, but they don't seem to cover this?
Thanks for any help!
I have the following file on Unix where i need to extract the USER=<name> string, eg USER=boma1508 into a seperate file so we can look at the usernames stored in the log :
31-MAY-2004 17:52:23 *
(CONNECT_DATA=(SERVICE_NAME=HRP036A.pb.astra.COM)(CID=(PROGRAM=BUSOBJ.EXE)(HOST=MADWMA31)(USER=boma1508))
) * (ADDRESS=(PROTOCOL=tcp)(HOST=129.214.173.174)(PORT=1134)) * establish * * 0
31-MAY-2004 17:52:39 *
(CONNECT_DATA=(SERVICE_NAME=HORIP036A.pb.astra.COM)(CID=(PROGRAM=BUSOBJ.EXE)(HOST=MADWMA31)(USER=PJC1508))
) * (ADDRESS=(PROTOCOL=tcp)(HOST=129.244.113.174)(PORT=1335)) * establish *
31-MAY-2004 17:59:06 * (CONNECT_DATA=SERVICE_NAME=pb.astra.COM)(CID=PROGRAM=C:\ProgramFiles\Business Objects\Server\B
roadcast Agent 5.0\BcsScdul.exe)(HOST=CGTSAPP220)(USER=SVC_BusObj))) * (ADDRESS=(PROTOCOL=tcp)(HOST=165.15.33.147)(PORT=1192)) * establish * HORP036A.pb.astra.COM * 0
31-MAY-2004 17:59:07 *
(CONNECT_DATA=(SERVICE_NAME=HAORP036A.pb.astra.COM)(CID=(PROGRAM=C:\Program Files\Business Objects\Server\B
roadcast Agent 5.0\BcsScdul.exe)(HOST=CGTSAPP220)(USER=SVC_BusObj))) *
(ADDRESS=(PROTOCOL=tcp)(HOST=125.65.33.147)(PORT=1193)) * establish * HOIRP036A.pb.astra.COM * 0
The USER portion exists at different character postions on each line, and the log has over 50,000 lines, so can anyone recommend a way to achieve this?, the command if possible would be great! I have looked at Vi and sed, but they don't seem to cover this?
Thanks for any help!