Put the skel stuff in the wrong place... More cofrfee please.
This commit is contained in:
21
pi4/files/etc/skel/.bash_functions
Normal file
21
pi4/files/etc/skel/.bash_functions
Normal file
@ -0,0 +1,21 @@
|
||||
memuse() {
|
||||
ps axo rss,comm,pid \
|
||||
| awk '{ proc_list[$2] += $1; } END \
|
||||
{ for (proc in proc_list) { printf("%d\t%s\n", proc_list[proc],proc); }}' \
|
||||
| sort -n | tail -n 10 | sort -rn \
|
||||
| awk '{$1/=1024;printf "%.0fMB\t",$1}{print $2}'
|
||||
}
|
||||
|
||||
|
||||
pdf()
|
||||
{
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo 'Usage: pdf <file>' >&2
|
||||
else
|
||||
local dir=$(mktemp -d -p /tmp pdf_conversion.XXXXXX)
|
||||
local outFile="${1##*/}"
|
||||
local outFile="${outFile%.*}"
|
||||
pdftohtml -noframes -i -s "$1" "${dir}/${outFile}.html"
|
||||
w3m -s "${dir}/${outFile}.html"
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user