You are not logged in.

#2601 2015-07-16 10:02:22

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Post your handy self made command line utilities

null wrote:

If there are older pacnew files there might be a good reason for it.

Hopefully the good reason does not imply the importance of the file.pacnew's content.
Because, as far as I know, older pacnew's should be simply overwritten by newer ones.

Last edited by respiranto (2015-07-16 10:04:08)

Offline

#2602 2015-07-16 10:08:46

null
Member
Registered: 2009-05-06
Posts: 398

Re: Post your handy self made command line utilities

The good reason is usually that I really need to redo the config because the old is justs chaotic, the new ships with new options that look interesting (like mpd does occasionally) and/or I've no idea what I did there a couple of years ago. So it's great to have the pacnew file there as a reminder.

Offline

#2603 2015-07-16 17:19:27

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Post your handy self made command line utilities

respiranto wrote:

Because, as far as I know, older pacnew's should be simply overwritten by newer ones.

This is not always the case.


Matt

"It is very difficult to educate the educated."

Offline

#2604 2015-07-16 18:18:01

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Post your handy self made command line utilities

mrunion wrote:
respiranto wrote:

Because, as far as I know, older pacnew's should be simply overwritten by newer ones.

This is not always the case.

In what instance would it not be the case?

Offline

#2605 2015-07-17 12:27:20

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Post your handy self made command line utilities

mirrorlist comes to mind.  Also grub.cfg if you maintain your own instead of using the horrid one grub-mkconfig generates.

Last edited by Earnestly (2015-07-17 12:27:45)

Offline

#2606 2015-07-17 13:04:51

parchd
Member
Registered: 2014-03-08
Posts: 421

Re: Post your handy self made command line utilities

I think you are talking about two different things here. Nobody was claiming that a config file should be blindly replaced by the pacnew. It was that, one unmerged pacnew would be replaced by a newer pacnew file should an update result in one.

Offline

#2607 2015-07-17 18:05:42

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Post your handy self made command line utilities

New password shadows, etc. They need some hands-on attention sometimes. New config files that have been modified, etc. (Journal config, for example.)


Matt

"It is very difficult to educate the educated."

Offline

#2608 2015-07-24 22:02:05

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Post your handy self made command line utilities

A function to print connman credentials:

passes(){
  awk -F= '
        /^Name/ && !/Wired/ {printf "%s: ",$2};
        /^Pass/ {for(i=2;i<=NF;i++){printf "%s%s",(i>2?" ":""), $i} printf "\n"}
      ' /var/lib/connman/*/settings
}

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#2609 2015-07-26 23:23:02

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: Post your handy self made command line utilities

I installed again arch before two days and I'm using budgie desktop and I wanted a light way to automatic change background. I know that there are some scripts already, but I'd like solid color backgrounds instead of images. So I wrote this script to automatic change to color of desktop and lock screen background every minute:

#/bin/bash
COLORS=("\"#0f2030\"" "\"#4a6159\"" "\"#2e0000\"" "\"#123644\"" "\"#203339\"" "\"#405163\"" "\"#748280"\"" "\"#07473F"\"" "\"#007CC3"\"" "\"#004A75"\"" "\"#565B63"\"" "\"#301515"\"")
echo $COLORS
cLen=${#COLORS[@]}
echo $cLen

while true
do
	es=${COLORS[$((RANDOM%$cLen-1))]}
	dconf write /org/gnome/desktop/background/primary-color $es
	dconf write /org/gnome/desktop/background/secondary-color $es
	dconf write /org/gnome/desktop/screensaver/primary-color $es
	dconf write /org/gnome/desktop/screensaver/secondary-color $es
	sleep 60
done

Offline

#2610 2015-07-27 18:46:42

papajoke
Member
From: france
Registered: 2014-10-10
Posts: 40

Re: Post your handy self made command line utilities

when i open the console, for auto teach one command from man

man -k $(ls /usr/share/man/man[1-8]/*.gz | cut -d "." -f1 | cut -d "/" -f6 | shuf | head -n 1)

or only in your language (fr):

man -k $(ls /usr/share/man/fr/man[1-8]/*.gz | cut -d "." -f1 | cut -d "/" -f7 | shuf | head -n 1)

EDIT: thanks karol

man -k $(find /usr/share/man/man[1-8]/ -not -name '*_*' -not -name '*::*' -printf "%f\n" |shuf -n 1|cut -d. -f1) |head -n 1

Last edited by papajoke (2015-07-28 00:02:33)


lts - zsh - Kde - Intel Core i3 - 6Go RAM - GeForce 405 video-nouveau

Offline

#2611 2015-07-27 22:38:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Post your handy self made command line utilities

papajoke wrote:

when i open the console, for auto teach one command from man

man -k $(ls /usr/share/man/man[1-8]/*.gz | cut -d "." -f1 | cut -d "/" -f6 | shuf | head -n 1)

or only in your language (fr):

man -k $(ls /usr/share/man/fr/man[1-8]/*.gz | cut -d "." -f1 | cut -d "/" -f7 | shuf | head -n 1)

http://mywiki.wooledge.org/ParsingLs

$ man -k $(find /usr/share/man/man[1-8] -printf "%f\n" | shuf -n 1 | cut -d. -f1)
fdatasync (2)        - synchronize a file's in-core state with storage device
fdatasync (3p)       - synchronize the data of a file (REALTIME)
$ man -k $(find /usr/share/man/man[1-8] -printf "%f\n" | shuf -n 1 | cut -d. -f1)
iso-8859-10 (7)      - ISO 8859-10 character set encoded in octal, decimal, and hexadecimal
$ man -k $(find /usr/share/man/man[1-8] -printf "%f\n" | shuf -n 1 | cut -d. -f1)
pango-view (1)       - Pango text viewer

Offline

#2612 2015-08-03 05:14:37

quequotion
Member
From: Oita, Japan
Registered: 2013-07-29
Posts: 814
Website

Re: Post your handy self made command line utilities

Poor user's dynamic IP domain management with ssmtp:

E-mail your public IP address to user@domain.ext

#!/bin/bash

wget -qO- http://ipecho.net/plain | mail -s "$HOSTNAME woke up!" user@domain.ext

TODO: encrypt the address, ipv6?
NOTE: Remember, in a home or office network, the public IP address belongs to the router; make sure ports are open or forwarded, hope you don't have to deal with NAT, etc.

Systemd service to do this at boot:

[Unit]
Description=ip-drop
After=systemd-networkd-wait-online.service
Wants=systemd-networkd-wait-online.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bash "/usr/local/sbin/ip-drop"
StandardOutput=null
StandardError=journal

[Install]
WantedBy=multi-user.target

TODO: trigger on any DHCP cycle (how to detect from behind a router?)
NOTE: *-wait-online services are likely to increase boot time.

I configured my router to forward SSH so I can access my home PC from wherever smile + installed mpd from a cellphone, on a bus wink.

Last edited by quequotion (2017-12-22 02:31:45)

Offline

#2613 2015-08-04 16:50:59

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 341
Website

Re: Post your handy self made command line utilities

Hi
     Thought id post this handy wee function i use, in time for the soccer season starting, it shows realtime soccer results from around the world, im no programmer so any fixes, enhancements would be very welcome.

function score() {
watch -n10 --no-title "w3m http://www.livescores.com/ |awk '/live [0-9H]+[^ ]/,/red cards/'"
} 

regards

Last edited by cirrus (2016-12-04 21:36:30)

Offline

#2614 2015-08-12 23:42:57

yuannan
Member
Registered: 2015-08-12
Posts: 15

Re: Post your handy self made command line utilities

.

Last edited by yuannan (2023-01-06 04:34:39)

Offline

#2615 2015-08-12 23:52:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Post your handy self made command line utilities

See https://wiki.archlinux.org/index.php/Fo … s_and_code


I actully didn't know that you just "w!" or "wq!" in vim

Why not

map ss :w !sudo tee % > /dev/null<CR

I don't think ':wq!' helps here.

Last edited by karol (2015-08-12 23:54:57)

Offline

#2616 2015-08-13 01:40:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Post your handy self made command line utilities

And if you set write permission for your user, why do you then edit it with vim with sudo?  The whole permission changing becomes irrelevant then.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#2617 2015-08-17 11:37:46

zrianc
Member
Registered: 2012-12-29
Posts: 15

Re: Post your handy self made command line utilities

I call this "znap-update" and is my new way of updating my machine since I moved to btrfs recently:

#!/usr/bin/bash

# Variables for pacmatic
export DIFFPROG="meld"
export DIFFSEARCHPATH="/boot /etc /usr"

# No prompt for set -x
PS4=""

# If enabled, the following lines log output but also make it less interactive:
# Redirect stdout ( > ) into a named pipe ( >() ) running "tee"
#exec > >(tee -i /var/log/znap-update.log)
# Also log errors
#exec 2>&1

echo -e "znap-update begin at:" $(date)

echo -e "\nFinding a fast mirror:"
(set -x; reflector --verbose -l 10 -p http --sort rate --save /etc/pacman.d/mirrorlist)

echo -e "\nCleaning old packages:"
(set -x; pacman -Sc --color always)

echo -e "\nUpdate pkgfile:"
(set -x; pkgfile --update)

echo -e "\nUpdate abs:"
(set -x; abs)

echo -e "\nMounting .snapshots:"
(set -x; mount /.snapshots)
echo -e "Delete old temporary snapshot if not already deleted, error if already deleted:"
(set -x; btrfs subvolume delete -C /.snapshots/snapshot_root_update_new)
echo -e "Make new (temporary) snapshot:"
(set -x; btrfs subvolume snapshot / /.snapshots/snapshot_root_update_new)
if [ $? -ne 0 ]; then
   echo -e "\nERROR while creating new snapshot, exiting!"
   (set -x; umount /.snapshots)
   (set -x; sync)
   date
   exit
fi

echo -e "\nUpdate all official packages:"
(set -x; pacmatic -Syu --color always)

echo -e "\nYaourt update of AUR packages as $SUDO_USER:"
(set -x; sudo -u $SUDO_USER yaourt -Syua --color)

echo -e "\nTrying to remove no longer needed packages, error if no deprecated packaged are found:"
(set -x; pacman -Rns $(pacman -Qdtq) --color always)

echo -e "\nLocal packages:"
(set -x; yaourt -Qma --color | grep "local/")

echo -e "\n"
read -p "Do you want to keep the snapshot made before the upgrade? <Y/n> " prompt
echo -e "\n"
if [[ $prompt == "n" || $prompt == "N" || $prompt == "no" || $prompt == "No" || $prompt == "NO" ]]
then
   (set -x; btrfs subvolume delete -C /.snapshots/snapshot_root_update_new)
else
   (set -x; btrfs subvolume delete -C /.snapshots/snapshot_root_update_3)
   (set -x; mv /.snapshots/snapshot_root_update_2    /.snapshots/snapshot_root_update_3)
   (set -x; mv /.snapshots/snapshot_root_update_1    /.snapshots/snapshot_root_update_2)
   (set -x; mv /.snapshots/snapshot_root_update_new  /.snapshots/snapshot_root_update_1)
fi

echo -e "\n"
(set -x; btrfs subvolume list -a -t --sort=-gen /)
echo -e "\n"
(set -x; umount /.snapshots)
(set -x; sync)

#echo -e "\nOutput was logged at /var/log/znap-update.log, znap-update ended at:" $(date)
echo -e "\nznap-update ended at:" $(date)

Before this I was only using one long line that did everything else except the snapshot part.

I am still not sure if I should keep 3 or more snapshots... I will see in time depending on how much space they will use.

It is meant to be run with sudo from an x terminal.

I also have two simple scripts that make snapshots one before login (called by systemd) and one every day (called by anacron), they are identicaly except one has the word "daily" and one has the word "login" so I will only paste one of them:

#!/usr/bin/bash

# Redirect stdout ( > ) into a named pipe ( >() ) running "tee"
exec > >(tee /var/log/znap-daily.log)

# log errors
exec 2>&1

echo -e "znap-daily begin at:" $(date)

echo -e "\nMounting .snapshots:"
mount /.snapshots
echo -e "Delete old temporary daily snapshot if not already deleted, error if already deleted:"
btrfs subvolume delete -C /.snapshots/snapshot_root_daily_new
echo -e "Make new (temporary) snapshot:"
btrfs subvolume snapshot / /.snapshots/snapshot_root_daily_new
if [ $? -ne 0 ]; then
   echo -e "\nERROR while creating new snapshot, exiting!"
   umount /.snapshots
   sync
   date
   exit
fi
echo -e "Delete old daily snapshot, error if already deleted:"
btrfs subvolume delete -C /.snapshots/snapshot_root_daily
echo -e "Renaming temporary daily snapshot as .snapshots/snapshot_root_daily:"
mv /.snapshots/snapshot_root_daily_new    /.snapshots/snapshot_root_daily

echo -e "\n"
btrfs subvolume list -a -t --sort=-gen /
umount /.snapshots
sync

echo -e "\nznap-daily done at:" $(date)

I first made one single more complex script called "znap" that used parameters for more than what the existing scripts do but it became to complex and it kind of reinvented the wheel (it functions just to make, list or delete a snapshot for example) so I preferred this much simpler and primitive scripts because they are much more maintainable.
I didn't use snapper because it is to much for my needs.

This is how my btrfs subvolumes look right now, in time I might add more subvolumes for stuff that don't need to be included in snapshots:

btrfs subvolume list -a -t --sort=-gen /
ID	gen	top level	path	
--	---	---------	----	
257	74728	5		<FS_TREE>/subvolume_root
258	74720	5		<FS_TREE>/subvolume_snapshots
1053	74718	258		<FS_TREE>/subvolume_snapshots/snapshot_root_login
327	74662	5		<FS_TREE>/subvolume_pkg
1007	74662	258		<FS_TREE>/subvolume_snapshots/snapshot_root_update_1
326	74646	5		<FS_TREE>/subvolume_abs
1005	74645	258		<FS_TREE>/subvolume_snapshots/snapshot_root_update_2
727	74644	5		<FS_TREE>/subvolume_pkgfile
1002	74623	258		<FS_TREE>/subvolume_snapshots/snapshot_root_update_3
1001	74620	258		<FS_TREE>/subvolume_snapshots/snapshot_root_daily
262	74092	257		subvolume_root/var/lib/machines

Offline

#2618 2015-08-17 22:19:22

Saint0fCloud
Member
Registered: 2009-03-31
Posts: 137

Re: Post your handy self made command line utilities

^Why are you spawning a subshell with `set -x` everytime you want to run an external command?

Offline

#2619 2015-08-17 22:43:16

zrianc
Member
Registered: 2012-12-29
Posts: 15

Re: Post your handy self made command line utilities

Saint0fCloud wrote:

^Why are you spawning a subshell with `set -x` everytime you want to run an external command?

Because I wanted to display most of the commands but not everything, for example I wanted to not display if then.
If I put set -x at beginning and then set +x and then again set -x it displays the "set +x" so I used one subshell for each command I wanted to display.
I could have used fewer subshells and group commands but I let them like this for formatting reasons, it looked more clear to me this way.

So TL;DR: For formatting.

Offline

#2620 2015-08-23 06:17:14

hawkinstw
Member
Registered: 2013-01-26
Posts: 7

Re: Post your handy self made command line utilities

I don't know if this is a sane thing to do but why doesn't pacman do the following

if [ -e /var/lib/pacman/db.lck ]; then
        if [ pidof pacman ]; then 
                echo pacman already busy                 
        else rm -rf /var/lib/pacman/db.lck               
fi               

EDIT:
oh, right. it'll catch itself, but a wrapper could do this

Last edited by hawkinstw (2015-08-23 06:19:53)

Offline

#2621 2015-08-23 11:48:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Post your handy self made command line utilities

hawkinstw, how often do you need to delete the lock file??  If you ever have to delete it it is because something has gone wrong.  If you regularly have to delete it, then something is very wrong.  Don't just clear away the symptom, find the problem.  In several years of using archlinux I think I've only needed to delete a pacman lock file once, and that was due to a power outage during an upgrade.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#2622 2015-08-24 11:08:31

hawkinstw
Member
Registered: 2013-01-26
Posts: 7

Re: Post your handy self made command line utilities

Trilby, Here in South Africa we have loadshedding, meaning some weeks we have 2 or 4 hours of power failure per day. Chances are very good for it happening during an upgrade if you have 10 or more archlinux systems

Offline

#2623 2015-08-24 11:15:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: Post your handy self made command line utilities

Ah, in that case it makes sense.  It just seemed a symptom of a deeper problem ... and there is a deeper problem, but one that is out of your control.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#2624 2015-08-25 01:50:31

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Post your handy self made command line utilities

create playcount histograms from files generated by mpdscribble's file backend:

*update* use gettops

carnager@caprica ~ > localfm "Pearl Jam" --album --lines 10
Most track plays (albums) for artist "Pearl Jam":

Pearl Jam - Vs.                   |133 (13.68%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Vitalogy              |127 (13.07%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Backspacer            |96 (9.88%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Lightning Bolt        |70 (7.20%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Precious And Beautiful|66 (6.79%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - No Code               |60 (6.17%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Ten                   |58 (5.97%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Pearl Jam             |54 (5.56%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Binaural              |40 (4.12%)   ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

carnager@caprica ~ > localfm "Pearl Jam" --lines 10
Most played tracks by artist "Pearl Jam":

Pearl Jam - Rearviewmirror                                  |19 (1.95%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Porch                                           |16 (1.65%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Daughter                                        |15 (1.54%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - State of Love and Trust                         |15 (1.54%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Elderly Woman Behind the Counter in a Small Town|14 (1.44%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - The Fixer                                       |14 (1.44%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Animal                                          |13 (1.34%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Breath                                          |13 (1.34%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Last Exit                                       |12 (1.23%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Pearl Jam - Better Man                                      |12 (1.23%) ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

And the script, uses the excellent distribution

#!/bin/bash

main () {
    stuff=$(grep -i "$name" mpd-formatted-tracks.txt |awk '{first = $1; $1 = ""; print $0 }' | sort | uniq -c)
    if [[ -n $album ]]; then
        if [[ -z $name ]]; then exit; fi
        rm -f /tmp/list
        echo "${stuff}" | sort | while read line; do
            plays=$(echo "$line" | awk -F ' ' '{ print $1 }')
            split=$(echo "$line" | awk '{first = $1; $1 = ""; print $0}' | cut -c 2-)
            artist=$(echo "$split" | awk -F ' - ' '{ print $1 }')
            title=$(echo "$split" | awk -F ' - ' '{ print $2 }')
            echo -e "${plays} $(mpc search --format '%artist% - %title% - %album%' artist "${artist}" title "${title}" | head -1)" >> /tmp/list
        done
        echo -e "Most track plays (albums) for artist \"${name}\":\n"   
        cat /tmp/list | awk -F ' - ' '{ print $1,"-",$3 }' | distribution -g --height=$lines --size=full --char=$char --width=100 ${color} 2>/dev/null | grep -vE "^-"
    else
        echo "${stuff}" | sort | distribution -g --height=$lines --size=full --char=$char --width=100 ${color} 2>/dev/null
    fi
}

printHelp () {
cat << EOF
local.fm
Usage: ${0##*/} [-sa] [-c CHARACTER] [-l LINES] [-n KEYWORD]

    -n "keyword"    keyword (mandatory)
    -s              colorize output
    -a              print album stats
    -c "foo"        use character "foo" for histogram
    -l "int"        print "int" lines
EOF
}

OPTIND=1

while getopts "hasn:l:c:" opt; do
    case "$opt" in
        h)
            printHelp
            exit 0
            ;;
        n)
            name=$OPTARG
            ;;
        a)
            album=true
            ;;
        l)
            lines=$OPTARG
            ;;
        c)
            char=$OPTARG
            ;;
        s)
            color="--color"
            ;;
    esac
done
shift "$((OPTIND-1))"
main

Album stats generation far too slow, which is why i had to disable it without specified artist.
Hopefully someone has interest in this and makes it fast smile

Last edited by Rasi (2015-08-25 23:48:58)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#2625 2015-08-25 04:21:04

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,418
Website

Re: Post your handy self made command line utilities

...you know, getopts is a thing.

http://mywiki.wooledge.org/BashFAQ/035#getopts


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

Board footer

Powered by FluxBB