Removing duplicate characters from a string on Linux with awk
Monday, 13 June 2022
Add Comment
The awk command can make it easy to remove duplicate characters from a string even when those characters aren’t sequential, especially when the process is turned into a script.
First, the awk command that we’ll be using starts by running through each letter in the string. In a more common command, you might see awk doing something like this:
$ echo one:two:three | awk ‘BEGIN {FS =":"} ; { print $2 }’ two
The FS portion of that command specifies the field separator—the character that is used to separate the fields in the string so that they can be processed separately.
from Network World https://ift.tt/0gd5KrN
Genrerating Link.... 15 seconds.
Your Link is Ready.
0 Response to "Removing duplicate characters from a string on Linux with awk"
Post a Comment