bash strings

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
STRING="test - ";
STRING="${STRING}a\n\t";
STRING="${STRING}b\n\t";
STRING="${STRING}c\n\t";
# test - abc
echo -e $STRING;
# printf "%10s %s\n" "testtt" "asd
# printf "%-10s %s\n" "testtt" "asd
# количество символов в STRING
echo ${#STRING}
exit 0;