find IDs of databases with error during upgrade
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I have a log file of errors captured in my database, the file contains a list of the records that had errors and were not updated. The record names are 10 digits and start with a strA:
Error: could not save changes to record strA5903427123
Error: could not save changes to record strB4403298440
Error: could not save changes to record strC5903427342
Error: could not save changes to record strD4403298988
Error: could not save changes to record strE5903427298
Error: could not save changes to record strF4403298232
Error: could not save changes to record strG5903427455
Error: could not save changes to record strH4403298223
I want to extract the list of ten digits and A and remove "Error: could not save changes to record str", how can I do it in bash, this is a very long list and I have many files like this one everyone for the database.
text-processing logs
New contributor
add a comment |Â
up vote
4
down vote
favorite
I have a log file of errors captured in my database, the file contains a list of the records that had errors and were not updated. The record names are 10 digits and start with a strA:
Error: could not save changes to record strA5903427123
Error: could not save changes to record strB4403298440
Error: could not save changes to record strC5903427342
Error: could not save changes to record strD4403298988
Error: could not save changes to record strE5903427298
Error: could not save changes to record strF4403298232
Error: could not save changes to record strG5903427455
Error: could not save changes to record strH4403298223
I want to extract the list of ten digits and A and remove "Error: could not save changes to record str", how can I do it in bash, this is a very long list and I have many files like this one everyone for the database.
text-processing logs
New contributor
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I have a log file of errors captured in my database, the file contains a list of the records that had errors and were not updated. The record names are 10 digits and start with a strA:
Error: could not save changes to record strA5903427123
Error: could not save changes to record strB4403298440
Error: could not save changes to record strC5903427342
Error: could not save changes to record strD4403298988
Error: could not save changes to record strE5903427298
Error: could not save changes to record strF4403298232
Error: could not save changes to record strG5903427455
Error: could not save changes to record strH4403298223
I want to extract the list of ten digits and A and remove "Error: could not save changes to record str", how can I do it in bash, this is a very long list and I have many files like this one everyone for the database.
text-processing logs
New contributor
I have a log file of errors captured in my database, the file contains a list of the records that had errors and were not updated. The record names are 10 digits and start with a strA:
Error: could not save changes to record strA5903427123
Error: could not save changes to record strB4403298440
Error: could not save changes to record strC5903427342
Error: could not save changes to record strD4403298988
Error: could not save changes to record strE5903427298
Error: could not save changes to record strF4403298232
Error: could not save changes to record strG5903427455
Error: could not save changes to record strH4403298223
I want to extract the list of ten digits and A and remove "Error: could not save changes to record str", how can I do it in bash, this is a very long list and I have many files like this one everyone for the database.
text-processing logs
text-processing logs
New contributor
New contributor
edited 4 hours ago
msp9011
3,63543862
3,63543862
New contributor
asked 5 hours ago
Gabi
232
232
New contributor
New contributor
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
2
down vote
accepted
Is this what you want?
sed -e 's/^.*str//' test.in
Hope this helps
@Gabi ... you need to edit the question.start with a strA
is mentioned instead ofstart with a str
â msp9011
4 hours ago
add a comment |Â
up vote
2
down vote
using grep
to list the 10 digit ID that starts with A
grep -Eo "A[0-9]10" file
output
A5903427123
To list the 10 digit ID that starts with any uppercase alpha.
grep -Eo "[A-Z][0-9]10" file
A5903427123
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
add a comment |Â
up vote
2
down vote
You can do it in awk
as follows:
awk 'print $8' file | tr -d "str"
A5903427123
B4403298440
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Is this what you want?
sed -e 's/^.*str//' test.in
Hope this helps
@Gabi ... you need to edit the question.start with a strA
is mentioned instead ofstart with a str
â msp9011
4 hours ago
add a comment |Â
up vote
2
down vote
accepted
Is this what you want?
sed -e 's/^.*str//' test.in
Hope this helps
@Gabi ... you need to edit the question.start with a strA
is mentioned instead ofstart with a str
â msp9011
4 hours ago
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Is this what you want?
sed -e 's/^.*str//' test.in
Hope this helps
Is this what you want?
sed -e 's/^.*str//' test.in
Hope this helps
answered 5 hours ago
Lewis M
4493
4493
@Gabi ... you need to edit the question.start with a strA
is mentioned instead ofstart with a str
â msp9011
4 hours ago
add a comment |Â
@Gabi ... you need to edit the question.start with a strA
is mentioned instead ofstart with a str
â msp9011
4 hours ago
@Gabi ... you need to edit the question.
start with a strA
is mentioned instead of start with a str
â msp9011
4 hours ago
@Gabi ... you need to edit the question.
start with a strA
is mentioned instead of start with a str
â msp9011
4 hours ago
add a comment |Â
up vote
2
down vote
using grep
to list the 10 digit ID that starts with A
grep -Eo "A[0-9]10" file
output
A5903427123
To list the 10 digit ID that starts with any uppercase alpha.
grep -Eo "[A-Z][0-9]10" file
A5903427123
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
add a comment |Â
up vote
2
down vote
using grep
to list the 10 digit ID that starts with A
grep -Eo "A[0-9]10" file
output
A5903427123
To list the 10 digit ID that starts with any uppercase alpha.
grep -Eo "[A-Z][0-9]10" file
A5903427123
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
add a comment |Â
up vote
2
down vote
up vote
2
down vote
using grep
to list the 10 digit ID that starts with A
grep -Eo "A[0-9]10" file
output
A5903427123
To list the 10 digit ID that starts with any uppercase alpha.
grep -Eo "[A-Z][0-9]10" file
A5903427123
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
using grep
to list the 10 digit ID that starts with A
grep -Eo "A[0-9]10" file
output
A5903427123
To list the 10 digit ID that starts with any uppercase alpha.
grep -Eo "[A-Z][0-9]10" file
A5903427123
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
edited 4 hours ago
answered 5 hours ago
msp9011
3,63543862
3,63543862
add a comment |Â
add a comment |Â
up vote
2
down vote
You can do it in awk
as follows:
awk 'print $8' file | tr -d "str"
A5903427123
B4403298440
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
add a comment |Â
up vote
2
down vote
You can do it in awk
as follows:
awk 'print $8' file | tr -d "str"
A5903427123
B4403298440
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
add a comment |Â
up vote
2
down vote
up vote
2
down vote
You can do it in awk
as follows:
awk 'print $8' file | tr -d "str"
A5903427123
B4403298440
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
You can do it in awk
as follows:
awk 'print $8' file | tr -d "str"
A5903427123
B4403298440
C5903427342
D4403298988
E5903427298
F4403298232
G5903427455
H4403298223
edited 4 hours ago
answered 5 hours ago
Goro
8,14153878
8,14153878
add a comment |Â
add a comment |Â
Gabi is a new contributor. Be nice, and check out our Code of Conduct.
Gabi is a new contributor. Be nice, and check out our Code of Conduct.
Gabi is a new contributor. Be nice, and check out our Code of Conduct.
Gabi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474344%2ffind-ids-of-databases-with-error-during-upgrade%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password