Watch for spaces after breaking line character \
.
They are mischevious, eg. █ is space:
> arr=("a" \█
"b" \
"c")
> echo ${#arr[@]}
4
We expected the 4 elements. In the case above we have 4: “a” “ “ “b” “c”… huh.
arr=("a" \
"b" \
"c")
echo ${#arr[@]}
3
TODO: Import all notes from google drive!
killing process by name:
pkill -f "java.*MyApplicationToKill"
dpkg -l <name-of-package>
or better: dpkg -l | grep
`
for i in {0..20}; do echo $i; done
Getting input from cat:
cat << EOF | wc
ala
ma
kota
123
EOF
And to output files:
cat << EOF > output.file2
> abc
> def
> EOF
#Basics:
find -name '*.*'
# Find one name or the other: -o is for "or"
find -name '*.java' -o -name '*.properties'