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 | |
function adjust() { | |
local cwd=$(pwd) | |
local sd=$1 | |
local total=$2 | |
local mtime1=0 | |
local mtime2=0 | |
local gap=0 | |
cd ${sd} |
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 | |
function adjust() { | |
local cwd=$(pwd) | |
local sd=$1 | |
local total=$2 | |
local mtime1=0 | |
local mtime2=0 | |
local gap=0 | |
cd ${sd} | |
for ssd in $(ls -t -r -d */) |
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 | |
SafariInfected=0 | |
echo -n "Checking Safari... " | |
if [[ -z `defaults read /Applications/Safari.app/Contents/Info LSEnvironment 2>&1 | grep "does not exist"` ]]; then | |
SafariInfected=1 | |
echo "INFECTED." | |
else | |
echo "NOT INFECTED." | |
fi |
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
# redirect stdout to a file | |
cat 1.txt > r.txt | |
# redirect stderr to a file | |
grep "error" 1.log 2> r.txt | |
# redirect stdout to a stderr | |
grep * 1>&2 | |
# redirect stderr to a stdout |
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
# Works on Linux and Mac OS | |
cat /dev/urandom | strings | grep -m 1 -oEi '[a-zA-Z0-9_^!#]{8}' |
NewerOlder