This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PASSWORD=<PASSWORD> | |
node=<IP> | |
# Copy to remote node | |
echo y | pscp -pw "${PASSWORD}" /path/to/Script.sh <user>@"$node":/tmp/Script.sh | |
# Move to required / accessible directory | |
echo y | plink -ssh -pw "${PASSWORD}" -t <user>@"$node" "sudo cp /tmp/Script.sh /required/path/" | |
# Convert to Linux BASH (if file edited in Windows) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file=<filename.format> | |
declare -A valueArray | |
declare -a keyArray | |
while IFS='=' read -r key value | |
do | |
key=($(echo $key | tr '.' '_')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ "$string" == *"$substring"* ]]; then | |
# TO DO | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while IFS= read -r line; | |
do | |
URL=$(echo $line | grep / | cut -d/ -f3) | |
HOST=$(echo $URL | grep : | cut -d: -f1) | |
PORT=$(echo $URL | grep : | cut -d: -f2) | |
# TO DO | |
done < <( cat <file.format> | grep <substring> ) |