bash
TODO
- command line - How to mass prepend text to file names? - Super User
- How to split one string into multiple strings separated by at least one space in bash shell? - Stack Overflow
- bash - Set environment variables from file of key/value pairs - Stack Overflow
- Bash Loop Through a List of Strings
- bash - How to replace ${} placeholders in a text file? - Stack Overflow
- unix - How to read a file into a variable in shell? - Stack Overflow
netstat -tulpn
- How To Append Current Date To Filename in Bash Shell - nixCraft
- How to List Users in Linux | Linuxize
How to save command as variable
x=`{pwd}`
echo $x
Append Path
export PATH="your-dir:$PATH"
Load .env file
if [ -f .env ]
then
export $(cat .env | sed 's/#.*//g' | xargs)
fi
while getopts u:a:f: flag
do
case "${flag}" in
P) repo_path=${OPTARG};;
a) age=${OPTARG};;
f) fullname=${OPTARG};;
esac
done
Remove all non ASCII characters in all files in folder
for file in *; do
if [ -f "$file" ]; then
mv $file $(echo `$file` | sed -e 's/[^A-Za-z0-9._-]/_/g')
fi
done
rsync -avzhe ssh --progress dentropy@192.168.2.8:/home/dentropy/dentropycloud-traefik/apps/qbitttorrent/config/downloads .