Memo

De Linuxmemo.

(Différences entre les versions)
(Page créée avec « Catégorie:Bash egrep -v "^(#|$)" ls $PWD/awstats.pl for i in $(ls *.m4a);do avconv -i $i ${i/.m4a/.mp3} ; done mkdir rep{1,2,3} cp ntp.conf{,.bak} »)
 
(4 versions intermédiaires masquées)
Ligne 1 : Ligne 1 :
[[Catégorie:Bash]]
[[Catégorie:Bash]]
 +
  egrep -v "^(#|$)"
  egrep -v "^(#|$)"
   
   
Ligne 9 : Ligne 10 :
  cp ntp.conf{,.bak}
  cp ntp.conf{,.bak}
 +
 +
echo {1..111}
 +
 +
echo {1,2,3,4,5}
 +
 +
echo $((1+1))
 +
 +
https://www.networkworld.com/article/3087606/linux/chomping-down-on-bashs-brace-expansion.html
 +
 +
insert -- between the command (like cp) and its arguments. That tells it to stop scanning for options, and all is well
 +
cp -- "$file" "$target"

Version actuelle en date du 13 octobre 2020 à 07:46


egrep -v "^(#|$)"

ls $PWD/awstats.pl
for i in $(ls *.m4a);do avconv -i $i ${i/.m4a/.mp3} ; done
mkdir rep{1,2,3}
cp ntp.conf{,.bak}
echo {1..111}
echo {1,2,3,4,5}

echo $((1+1))

https://www.networkworld.com/article/3087606/linux/chomping-down-on-bashs-brace-expansion.html

insert -- between the command (like cp) and its arguments. That tells it to stop scanning for options, and all is well
cp -- "$file" "$target"
Outils personnels