Adds scripts
This commit is contained in:
15
scripts/shell/format-xml.sh
Executable file
15
scripts/shell/format-xml.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
# Create a temporary file
|
||||||
|
temp_file=$(mktemp)
|
||||||
|
|
||||||
|
# Run xmllint and output to the temporary file
|
||||||
|
if xmllint --format "$1" >"$temp_file"; then
|
||||||
|
# If successful, replace the original file with the formatted file
|
||||||
|
mv "$temp_file" "$1"
|
||||||
|
else
|
||||||
|
# If unsuccessful, remove the temporary file
|
||||||
|
rm "$temp_file"
|
||||||
|
echo "Formatting failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
3
scripts/shell/ports-in-use.sh
Executable file
3
scripts/shell/ports-in-use.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sudo lsof -i -P -n | grep LISTEN
|
||||||
Reference in New Issue
Block a user