Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #!/usr/bin/env bash | |
| # | |
| # Helper for adding annotations to TaskWarrior tasks. | |
| # Features: | |
| # - Add multi-line annotations to your tasks using your preferred editor. | |
| # - Add single-line annotations as always (via cli arguments) or using the editor. | |
| # | |
| # Copyright (C) 2021 Rafael Cavalcanti <https://rafaelc.org/dev> | |
| # Copyright (C) 2016 djp <djp@cutter> | |
| # |
| # MIT License | |
| # | |
| # Copyright (c) 2023 Miguel Grinberg | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
:py3 import os; print(os.__file__)It will print something like: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py
lib/python3.7/os.py to bin/python3):export VIMPY="/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/bin/python3"| # Input: list of rows with format: "<filesize> filename", e.g. | |
| # filesizes.txt | |
| ####################### | |
| # 1000K file1.txt | |
| # 200M file2.txt | |
| # 2G file3.txt | |
| # | |
| # Output: | |
| cat filesizes.txt | numfmt --from=iec | awk 'BEGIN {sum=0} {sum=sum+$1} END {printf "%.0f\n", sum}' |
| Development Status :: 1 - Planning | |
| Development Status :: 2 - Pre-Alpha | |
| Development Status :: 3 - Alpha | |
| Development Status :: 4 - Beta | |
| Development Status :: 5 - Production/Stable | |
| Development Status :: 6 - Mature | |
| Development Status :: 7 - Inactive | |
| Environment :: Console | |
| Environment :: Console :: Curses | |
| Environment :: Console :: Framebuffer |
| # These examples assume you have a container currently running. | |
| # 1 Pipe from a file | |
| sudo docker exec --interactive CONTAINER_NAME /bin/bash < the_beginning.sh | tee the_beginning_output.txt` | |
| #2a Pipe by piping | |
| echo "echo This is how we pipe to docker exec" | sudo docker exec --interactive CONTAINER_NAME /bin/bash - |