Create Anagrams With Bash On Linux
Page 1 of 1
Create Anagrams With Bash On Linux
- Code:
sudo apt-get install -y an
- Code:
an -l 8 ballbags
fatphil.org/words/an.html
Re: Create Anagrams With Bash On Linux
- Code:
sudo apt-get install -y an
- Code:
#/bin/bash
# an -l 8 ballbags
myvar="$@"
size=${#myvar}
#echo $size
#echo $myvar
an -l $size $myvar
Make Executable
- Code:
sudo chmod +x anagrams.sh
Usage:
- Code:
./anagrams.sh ballbags
Or
- Code:
./anagrams.sh "ballbagsn"
Re: Create Anagrams With Bash On Linux
Make words from the letters
Or
- Code:
#/bin/bash
# an -l 8 ballbags
myvar="$@"
size=${#myvar}
#echo $size
#echo $myvar
an -l $size -w $myvar
Or
- Code:
./anagrams.sh -w "ballbagsn"
Re: Create Anagrams With Bash On Linux
Full usage for the an command
Usage: an [options] PHRASE
Usage: an [options] PHRASE
- Code:
-c, --contain PHRASE print anagrams containing PHRASE
-d, --dict DICTIONARY search DICTIONARY for words
-l, --length WORDS find anagrams with up to WORDS number of words
-m, --minimum WORDLEN only use words at least WORDLEN long
-n, --number NUM print a maximum of NUM anagrams
-w, --words print words that PHRASE letters make
-t, --test ANAG test if ANAG can be made with PHRASE
-u, --used PHRASE flag PHRASE letters as already used
-h, --help display this help and exit
-v, --version output version information and exit
Re: Create Anagrams With Bash On Linux
Updated Words Version
- Code:
#/bin/bash
#Usage ./anagram_words.sh' "SANTA"
myvar="$@"
size=${#myvar}
#echo $size
#echo $myvar
echo $myvar > $myvar.words.txt
an -l $size -w $myvar >> $myvar.words.txt
cat $myvar.words.txt
Similar topics
» Using Figlet To Create banner Art From Command Line With Bash
» Bash Psychic Game For Linux Bash
» create ssl webserver at last with linux
» Use RUSTUP to create your first RUST Program on LINUX | Rust Programming for Beginners
» how to create a free linux localhost proxie
» Bash Psychic Game For Linux Bash
» create ssl webserver at last with linux
» Use RUSTUP to create your first RUST Program on LINUX | Rust Programming for Beginners
» how to create a free linux localhost proxie
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum