Substitute tabs for (4) spaces

pull/102/head
terminalforlife 4 years ago
parent bcb2d06328
commit de9000196e

@ -62,11 +62,11 @@ az disk list --output table
# Copy blob # Copy blob
az storage blob copy start \ az storage blob copy start \
--source-uri 'https://md-ldh5nknx2rkz.blob.core.windows.net/jzwuuuzzapn0/abcd?sv=2017-04-17&sr=b&si=68041718-6828-4f5e-9e6e-a1b719975062&sig=XXX' \ --source-uri 'https://md-ldh5nknx2rkz.blob.core.windows.net/jzwuuuzzapn0/abcd?sv=2017-04-17&sr=b&si=68041718-6828-4f5e-9e6e-a1b719975062&sig=XXX' \
--account-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX== \ --account-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX== \
--account-name destaccount \ --account-name destaccount \
--destination-container vms \ --destination-container vms \
--destination-blob DESTINATION-blob.vhd --destination-blob DESTINATION-blob.vhd
# List virtual networks # List virtual networks
az network vnet list --output table az network vnet list --output table

@ -6,23 +6,23 @@ done
# For example: # For example:
for CurDay in Monday Tuesday Wednesday Thursday Friday Saturday Sunday for CurDay in Monday Tuesday Wednesday Thursday Friday Saturday Sunday
do do
printf "%s\n" "$CurDay" printf "%s\n" "$CurDay"
done done
# To implement a case statement: # To implement a case statement:
case $1 in case $1 in
0) 0)
echo "Found a '0'." ;; echo "Found a '0'." ;;
1) 1)
echo "Found a '1'." ;; echo "Found a '1'." ;;
2) 2)
echo "Found a '2'." ;; echo "Found a '2'." ;;
3*) 3*)
echo "Something beginning with '3' found." ;; echo "Something beginning with '3' found." ;;
'') '')
echo "Nothing (null) found." ;; echo "Nothing (null) found." ;;
*) *)
echo "Anything else found." ;; echo "Anything else found." ;;
esac esac
# Turn on built-in Bash debugging output: # Turn on built-in Bash debugging output:
@ -67,8 +67,8 @@ command -v ${program} >/dev/null 2>&1 || error "${program} not installed"
# However, that is a solution commonly found in a script using the Bourne shell, so # However, that is a solution commonly found in a script using the Bourne shell, so
# in this case, an alternative, Bash-like, and more accurate version could be: # in this case, an alternative, Bash-like, and more accurate version could be:
if ! type -fP bash > /dev/null 2>&1; then if ! type -fP bash > /dev/null 2>&1; then
printf "ERROR: Dependency 'bash' not met." >&2 printf "ERROR: Dependency 'bash' not met." >&2
exit 1 exit 1
fi fi
# Send both STDOUT and STDERR from COMMAND to FILE. The `2>&1` must go at the end. # Send both STDOUT and STDERR from COMMAND to FILE. The `2>&1` must go at the end.

@ -47,12 +47,13 @@ UUID=<blkid#> /opt defaults 0 0 # 00 disable disk checking and metadata dumping
mount -a mount -a
df -h /opt df -h /opt
# Extending a physical disk (vm) # Extending a physical disk (vm). Step 3 prints partitions on `/dev/sdc`. Step
1. Unmount drive - comment out /etc/fstab entry for /dev/sdc # 4 deletes the old partition, then creates a new one.
2. Increase drive physical space 1. Unmount drive. Comment out `/etc/fstab` entry for `/dev/sdc`.
3. parted /dev/sdc - 'p' #print partitions on /dev/sdc 2. Increase drive physical space
4. fdisk /dev/sdc - 'p' - 'd' - 'n' (defaults) - w # delete old partition, create new partition 3. parted /dev/sdc - 'p'
5. reboot 4. fdisk /dev/sdc - 'p' - 'd' - 'n' (defaults) - w
6. e2fsck -f /dev/sdc1 5. reboot
7. resize2fs /dev/sdc1 6. e2fsck -f /dev/sdc1
8. mount /dev/sdc1 - uncomment fstab 7. resize2fs /dev/sdc1
8. mount /dev/sdc1 - uncomment fstab

@ -19,5 +19,5 @@ go install
# See also: # See also:
# Go language cheat sheets at /go/ # Go language cheat sheets at /go/
# list of pages: /go/:list # list of pages: /go/:list
# learn go: /go/:learn # learn go: /go/:learn
# search in pages: /go/~keyword # search in pages: /go/~keyword

@ -15,8 +15,8 @@ find -name \*.pdf -type f -print0 | xargs -0rn10 rm
find -name \*.pdf | xargs -I{} rm -rf '{}' find -name \*.pdf | xargs -I{} rm -rf '{}'
# Will show every .pdf like: # Will show every .pdf like:
# &toto.pdf= # &toto.pdf=
# &titi.pdf= # &titi.pdf=
# -n1 => One file by one file. ( -n2 => 2 files by 2 files ) # -n1 => One file by one file. ( -n2 => 2 files by 2 files )
find -name \*.pdf | xargs -I{} -n1 echo '&{}=' find -name \*.pdf | xargs -I{} -n1 echo '&{}='
# The above is, however, much faster and easier without xargs: # The above is, however, much faster and easier without xargs:

Loading…
Cancel
Save