Print only the lines that have specific properties
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
LlI have a text file i want to separate the output in one command as below:
- Print all lines that have all repeated characters.
- Print all lines with all repeated characters except the last one or the last two characters in the same line.
- Print all lines with all repeated characters except the first one or the first two characters in the same line.
Example:
1112266
44778
223334456
6778811
845511
3357788
The output should be
1112266 >>>>> All repeated characters.
44778 >>>>> All repeated except the last character.
223334456 >>> All repeated except the last two characters
6778811 >>>> All repeated except the first character.
845511 >>>> All repeated except the first two characters.
command-line
add a comment |Â
up vote
0
down vote
favorite
LlI have a text file i want to separate the output in one command as below:
- Print all lines that have all repeated characters.
- Print all lines with all repeated characters except the last one or the last two characters in the same line.
- Print all lines with all repeated characters except the first one or the first two characters in the same line.
Example:
1112266
44778
223334456
6778811
845511
3357788
The output should be
1112266 >>>>> All repeated characters.
44778 >>>>> All repeated except the last character.
223334456 >>> All repeated except the last two characters
6778811 >>>> All repeated except the first character.
845511 >>>> All repeated except the first two characters.
command-line
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
LlI have a text file i want to separate the output in one command as below:
- Print all lines that have all repeated characters.
- Print all lines with all repeated characters except the last one or the last two characters in the same line.
- Print all lines with all repeated characters except the first one or the first two characters in the same line.
Example:
1112266
44778
223334456
6778811
845511
3357788
The output should be
1112266 >>>>> All repeated characters.
44778 >>>>> All repeated except the last character.
223334456 >>> All repeated except the last two characters
6778811 >>>> All repeated except the first character.
845511 >>>> All repeated except the first two characters.
command-line
LlI have a text file i want to separate the output in one command as below:
- Print all lines that have all repeated characters.
- Print all lines with all repeated characters except the last one or the last two characters in the same line.
- Print all lines with all repeated characters except the first one or the first two characters in the same line.
Example:
1112266
44778
223334456
6778811
845511
3357788
The output should be
1112266 >>>>> All repeated characters.
44778 >>>>> All repeated except the last character.
223334456 >>> All repeated except the last two characters
6778811 >>>> All repeated except the first character.
845511 >>>> All repeated except the first two characters.
command-line
command-line
edited 12 secs ago
Kusalananda
109k14213336
109k14213336
asked 2 mins ago
Ahmed
454
454
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Â
draft saved
draft discarded
Â
draft saved
draft discarded
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%2f475315%2fprint-only-the-lines-that-have-specific-properties%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