Skip to content

Instantly share code, notes, and snippets.

@x3ric
x3ric / manscrape
Created June 10, 2024 15:45
Local Man Pages TXT
#!/bin/bash
if [[ "$EUID" -ne 0 ]]; then
echo "Please run this script with sudo."
exit 1
fi
mkdir -p "/home/$(logname)/man"
cd "/home/$(logname)/man"
filename="manpagelist.csv"
manpath=$(manpath)
IFS=':' read -r -a paths <<< "$manpath"
@x3ric
x3ric / ipofsite
Last active June 12, 2024 13:24
Get ip of a website
#!/bin/env bash
if [[ -z $1 ]]; then
echo "usage --> ipofsite kernel.org"
else
ping -c 1 "$1" | grep PING | cut -d " " -f 3 | sed 's/[()]//g'
fi