informatique:linux:awk
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:linux:awk [2019/06/06 07:26] – pteu | informatique:linux:awk [2020/10/04 17:32] – ne pas afficher les lignes en doublon pteu | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag> | ||
- | |||
- | |||
======awk====== | ======awk====== | ||
Line 86: | Line 83: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
===Le cas printf=== | ===Le cas printf=== | ||
Line 188: | Line 186: | ||
echo -e " | echo -e " | ||
toto | toto | ||
+ | </ | ||
+ | |||
+ | * émuler la fonction trim (efface les espaces avant et après une chaine) : | ||
+ | <code bash> | ||
+ | echo -e " | ||
+ | awk -F\: '{ sub(/^[ \t\r\n]+/, "", | ||
+ | </ | ||
+ | |||
+ | * ne pas afficher les lignes en doublon | ||
+ | <code bash> | ||
+ | # count s' | ||
+ | awk ' | ||
</ | </ |
informatique/linux/awk.txt · Last modified: 2022/04/13 13:03 by pteu