Last active
September 24, 2017 06:24
-
-
Save ivalexandru/eba841e8994e5f5b08187f28af53074f to your computer and use it in GitHub Desktop.
ForWhileUntil
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for VAR | |
in $(cat listaTelefoane | cut -d "0" -f 2 | egrep [0-9]{9}) | |
#cauta in lista si taie de la dreapta lui zero, | |
#apoi raman doar 9 cifre din telefon, deci {9} | |
do | |
echo +40$VAR | |
#asta le listeaza pe toate ce corespund; | |
done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
for VAR | |
in $(egrep -o [[:digit:]]{10} listaTelefoane) | |
#egrep alaturi de optiunea -o | |
#afiseaza doar regexul care face match | |
#fara optiunea -o afiseaza randul intreg | |
do | |
echo $VAR" e numar de telefon" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo salam |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment