I have a text file with one data column. Take the following data, for example:
united states
germany
france
canada
From which I am trying to create all possible variants of mixed cases. For example, a new file might look like this:
United states
uNited states
unIted states
uniTed states
unitEd states
uniteD stated
united States
united sTates
united stAtes
united staTes
united statEs
united stateS
UNited states
And so on, until all possible variations of the variants of each word are created.
Given the above input and the expected result, I have three questions.
- Is regex and sed the right tool for this job?
- What alternatives do I need for regex and sed for this task?
- If I used regex and sed, what would the correct syntax look like?
source
share