Results 1 to 4 of 4
Hello Everyone,
I have a problem that I am having a hard time finding an answer to. I have 2 files that I need to make into one file with ...
- 07-10-2008 #1Just Joined!
- Join Date
- Oct 2007
- Location
- Houston
- Posts
- 75
Text Placement
Hello Everyone,
I have a problem that I am having a hard time finding an answer to. I have 2 files that I need to make into one file with proper formatting.
I am trying to match the SID number in file one with the SID number in file two. To then make my result. The files are below.
File one looks like:
File #2:Code:File #1 SID517091 ACCTID00267 SERVER1\Backup of files on data\admin001 07/09/08 18:32 07/09/08 18:59 1225 527532559 SID517088 ACCTID00267 SERVER1\Backup of files on users\admin001 07/09/08 18:30 07/09/08 19:42 2335 2688906909 SID517089 ACCTID00267 SERVER1\Backup of SQL Server\admin001 07/09/08 18:30 07/09/08 18:30 4 110759
Result:Code:SID517091 ACCTID00267 Closing socket ECN1073741929 2 1215647978 SID517091 ACCTID00267 Established socket connection ECN1073741928 2 1215646375 SID517091 ACCTID00267 There is not enough space on the disk. (\SERVER1\data) SID517091 ACCTID00267 The process cannot access the file because it is being used by another process. SID517091 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 Closing socket SID517088 ACCTID00267 Established socket connection SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517089 ACCTID00267 Closing socket SID517089 ACCTID00267 Established socket connection
I tried various sed and a awk statement with no luck. Any help would be greatly appreciated.Code:SID517091 ACCTID00267 SERVER1\Backup of files on data\admin001 07/09/08 18:32 07/09/08 18:59 1225 527532559 Messages: SID517091 ACCTID00267 Closing socket ECN1073741929 2 1215647978 SID517091 ACCTID00267 Established socket connection ECN1073741928 2 1215646375 SID517091 ACCTID00267 There is not enough space on the disk. (\SERVER1\data) SID517091 ACCTID00267 The process cannot access the file because it is being used by another process. SID517091 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 SERVER1\Backup of files on users\admin001 07/09/08 18:30 07/09/08 19:42 2335 2688906909 Messages: SID517088 ACCTID00267 Closing socket SID517088 ACCTID00267 Established socket connection SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517088 ACCTID00267 The process cannot access the file because it is being used by another process. SID517089 ACCTID00267 SERVER1\Backup of SQL Server\admin001 07/09/08 18:30 07/09/08 18:30 4 110759 Messages: SID517089 ACCTID00267 Closing socket SID517089 ACCTID00267 Established socket connection
- 07-10-2008 #2Code:
awk 'NR == FNR { _[$1] = $0 next } _[$1] { printf "%s\nMessages:\n", (FNR == 1 ? "" : RS) _[$1] delete _[$1] }1' file1 file2
- 07-10-2008 #3Just Joined!
- Join Date
- Oct 2007
- Location
- Houston
- Posts
- 75
Perfect!
What does this mean:
I don't understand the _Code:_[$1]
- 07-10-2008 #4


Reply With Quote