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 | |
# ********************************************************************* | |
# script: ssh-forward-start.sh | |
# summary: Starts an SSH Port Forward process, forwarding a localhost | |
# port to a remote host. The PID of the SSH process will be saved to | |
# the file defined in the pid_filename variable. | |
# See the companion script ssh-forward-stop.sh, which stops the tunnel | |
# using the process information in the PID file. | |
# |
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 | |
# ********************************************************************* | |
# script: ssh-forward-stop.sh | |
# summary: Stops an SSH Port Forward process, previously started by | |
# the companion script `ssh-forward-start.sh`. | |
# | |
# Tested on macOS Sierra. | |
# | |
# dependencies: |
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
# Run from the root of the directory that contains files and subdiirectories. | |
# Dependencies: find, dos2unix | |
# Fina all files, then execute dos2unix on them | |
find . -type f -exec dos2unix "{}" \; |
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
# Run from the root of the directory that contains files and subdirectories. | |
# Dependencies: find, file | |
# Fina all files, then execute FILE on them, filter for the string 'CRLF' | |
find . -type f -exec file "{}" \; | grep CRLF |
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 | |
#### | |
# Scours log files for keywords, then and emails | |
# if it finds them. | |
# | |
# This script also has keywords to exclude. This is, within the matches | |
# if the exclude keywords appear, then those lines are excluded from | |
# the output report. This allows you to "match" on a long keyword ( | |
# e.g. "/some/directory/with/tools") yet exclude a specific match ( |
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 | |
echo "" | |
echo "E.A.Soto" | |
echo "Downloads each URL in a list into local files, first creating a 'downloads' directory in the current directory." | |
echo "Syntax: $0 [path-to-list]" | |
echo "" | |
# Check for parameters | |
if [[ -z $1 ]]; then |
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/sh | |
# ********************************************************************* | |
# script: filetoiplist | |
# summary: given a file path (assuming it has a host per line), looks | |
# up the IP for each host. | |
# dependencies: host; grep | |
# by: e.a.soto, [email protected] | |
# | |
# history |
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/sh | |
# ********************************************************************* | |
# script: geturilist | |
# summary: given a passed URL, extracts all URIs and returns a list, | |
# sorted and unique. | |
# dependencies: wget; grep | |
# by: e.a.soto, [email protected] | |
# | |
# history |
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/sh | |
# ********************************************************************* | |
# script: gethostlist | |
# summary: given a passed URL, extracts all hosts and returns a list, | |
# sorted and unique. | |
# dependencies: wget; grep | |
# by: e.a.soto, [email protected] | |
# | |
# history |
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/sh | |
# ********************************************************************* | |
# script: filetopingreply | |
# summary: given a file path (assuming it has a host per line), uses | |
# another script to get the IP for each host then tries | |
# an ICMP ping and returns those that reply | |
# NOTE: Backgrounds each PING to perform these faster! | |
# dependencies: filetoiplist (in same path as this script); grep | |
# by: e.a.soto, [email protected] |
OlderNewer