On 2017-08-01 03:00, Daniel Campbell wrote:

> # Add '-s' to interactively set the window to be captured.
> screenie() {
>       local curdir=$(pwd)
>       local shotname=$(date +%Y-%m-%d_%H-%M).png
>       echo "5 seconds! Go go go!"
>       cd ~/img/screens/comp/
>       scrot -d 5 -q 70 "$shotname" ${@}
>       echo "Screen taken! Find it under ~/img/screens/comp."
>       cd $curdir
> }
> 
> (now that I'm looking at it, it could use a spruce up to use pushd/popd
> instead of storing the starting dir in a variable...)

pushd and popd are bashisms, your current way works with any POSIX shell.

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
Do obvious transformation on domain to reply privately _only_ on Usenet.

Reply via email to