25 lines
593 B
Plaintext
25 lines
593 B
Plaintext
|
II
|
||
|
2) Echo $<commande>
|
||
|
3) Read lit l'entrée standart de la variable et retient ce qu'il y a dans le terminal.
|
||
|
4) read -p "Entrez une valeur :" x.
|
||
|
5) echo -n.
|
||
|
6) ";"
|
||
|
7) read -p "Mettez une commande : " x; echo "erere" $x
|
||
|
III
|
||
|
1) \U(+nombre)
|
||
|
2) read -p " " hex; echo -e " \U$hex"
|
||
|
3) chmod +x print_unicode_char
|
||
|
IV
|
||
|
1) man hexdump
|
||
|
2) #!/bin/bash
|
||
|
|
||
|
if [ $# -ne 1 ]; then
|
||
|
echo "Usage: $0 <caractère>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
caractere="$1"
|
||
|
encodage_utf8=$(printf "%s" "$caractere" | iconv -t UTF-8 | hexdump -C | awk '{print $2}' | tr -d '\n')
|
||
|
|
||
|
echo "L'encodage UTF-8 de '$caractere' est : 0x$encodage_utf8"
|