This file contains hidden or 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
Python script to perform multiple commands sequentially over SSH in a single connection | |
Known issue: | |
Execution of commands goes on one after another, even though one/many intermediate commands fails | |
(NOT recommended, if your commands and dependant on previous commands execution) | |
Kindly share your thoughts on this script. | |
Link to answer: https://stackoverflow.com/a/43071039/5243762 |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"html/template" | |
"log" | |
"net/http" | |
"os" | |
"strings" |
This file contains hidden or 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
package main | |
import ( | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"os" | |
"strings" | |
) |
This file contains hidden or 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 | |
# Check if exactly 2 arguments are provided | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <input_directory> <output_directory>" | |
exit 1 | |
fi | |
INPUT_DIR="$1" | |
OUTPUT_DIR="$2" |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"os/exec" | |
"strings" | |
"time" | |
) |