redo-ifchange root-servers.net.zone
-perl -lane 'print $F[$#F] if $F[3] =~ /^AA?/' < root-servers.net.zone |
+perl -lane 'print $F[$#F] if $F[3] =~ /^AA?/' <root-servers.net.zone |
while read addr ; do
[ "${addr#*:}" = "$addr" ] && echo $addr ||
sipcalc $addr | perl -lane 'print $F[$#F] if /^Compressed address/'
mv $tmp.webp $fn
echo $fn | tee $tmp.txt
else
- paster $tmp.webp > $tmp.txt
+ paster $tmp.webp >$tmp.txt
fi
xmessage -file $tmp.txt
[ $# -eq 0 ] && fs="$(find . -maxdepth 1 -type f)" || fs="$@"
for f in $fs ; do
- mv -v "$f" $(b3sum < "$f").${f##*.}
+ mv -v "$f" $(b3sum <"$f").${f##*.}
done
--progress \
--resolution=$resolution \
--source="$src" \
- $@ > tmp.ppm
+ $@ >tmp.ppm
}
process() {
}
preview() {
- process < tmp.ppm | pamdepth 255 | pnmscale -w 600 > preview.ppm
+ process <tmp.ppm | pamdepth 255 | pnmscale -w 600 >preview.ppm
sxiv preview.ppm
}
preview
;;
n)
- cat tmp.ppm | process > $cur
+ cat tmp.ppm | process >$cur
do_next
;;
r)
DISPLAY=:0 CMD="tmux attach-session -t www" CMDTITLE="Terminal9" $HOME/bin/dwm-term &
}
-if tmux has-session -t www 2> /dev/null ; then
+if tmux has-session -t www 2>/dev/null ; then
attached=`tmux list-sessions -F "#{session_attached}" -f "#{==:#{session_name},www}"`
[ "$attached" != "0" ] || {
term &
[[ -d $dst ]] || usage
mk_fifo
setopt PIPE_FAIL
- zfs send -Rwv $latest | zstdmt | $enccmd > $dst/$latest_filename.zfs.zst.age
+ zfs send -Rwv $latest | zstdmt | $enccmd >$dst/$latest_filename.zfs.zst.age
sync
touch $dst/$latest_filename.from
;;
$dst/$latest_filename.zfs.zst.age
set +x
sync
- print $latest_dst > $dst/$latest_filename.from
+ print $latest_dst >$dst/$latest_filename.from
;;
clean)
count=$3
shift
hsh=`gpg-wks-client --print-wkd-hash $email | cut -d " " -f1`
-gpg --export $@ > $hsh
-gpg --armor --export $@ > $hsh.asc
+gpg --export $@ >$hsh
+gpg --armor --export $@ >$hsh.asc
trap "rm -f $tmp.pnm $tmp.jxl" HUP PIPE INT QUIT TERM EXIT
case $1:e in
pnm) cp $1 $tmp.pnm ;;
-gif) giftopnm < $1 > $tmp.pnm ;;
-png) pngtopnm < $1 > $tmp.pnm ;;
+gif) giftopnm <$1 >$tmp.pnm ;;
+png) pngtopnm <$1 >$tmp.pnm ;;
webp) dwebp -mt -quiet -o $tmp.pnm $1 ;;
*)
print unknown extension >&2
tmp=`mktemp`
trap "rm $tmp" HUP PIPE INT QUIT TERM EXIT
-curl https://api.github.com/repos/${1}/${2}/releases > $tmp
-gojq -r ".[] | .assets[] | .browser_download_url" < $tmp
-gojq -r ".[] | .tarball_url" < $tmp
+curl https://api.github.com/repos/${1}/${2}/releases >$tmp
+gojq -r ".[] | .assets[] | .browser_download_url" <$tmp
+gojq -r ".[] | .tarball_url" <$tmp
tagsopt=(--global-tags $tags)
}
[[ -z ${info[-descr]} ]] || {
- txt=`xml esc < ${info[-descr]}`
+ txt=`xml esc <${info[-descr]}`
descrTag="<Tag><Simple><Name>DESCRIPTION</Name><String>$txt</String></Simple></Tag>"
tagsopt=(--global-tags $tags)
}
-printf "<Tags>\n%s\n%s\n</Tags>" $urlTag $descrTag > $tags
+printf "<Tags>\n%s\n%s\n</Tags>" $urlTag $descrTag >$tags
mkvmerge --no-date --disable-track-statistics-tags $tagsopt --output ${info[-out]} $@
mkvpropedit --set muxing-application=- --set writing-application=- ${info[-out]}
set date_format = "%Y-%m-%d %H:%M"
set index_format = "%4C %Z[%1H] %D [%N] %-15.15L (%?l?%4l&%4c?)%?M?[#%02M]?%?Y?[%Y]? %s"
set pipe_decode = yes
-set print_command = "cat > /tmp/mail-printed"
+set print_command = "cat >/tmp/mail-printed"
set attribution = "*** %n [%{%Y-%m-%d %H:%M}]:"
set forward_attribution_intro = "----- BEGIN %i -----"
set forward_attribution_trailer = "----- END %i -----"
[[ -n "$NNN_PIPE" ]]
autoload ~/.zsh/functions/cf
cf $1
-print -n -- "0c$PWD" > "$NNN_PIPE"
+print -n -- "0c$PWD" >"$NNN_PIPE"
setopt ERR_EXIT
sel=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
[[ -s $sel ]]
-tgts=$(xargs -0 -L1 < $sel)
+tgts=$(xargs -0 -L1 <$sel)
tgts=(${(f)tgts})
size=$(du -A -c $tgts)
size=(${=size})
autoload tmux-fzf-$1
tmp=`mktemp`
trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
-tmux-fzf-$1 > $tmp || { echo unknown command ; sleep 1 ; exit }
+tmux-fzf-$1 >$tmp || { echo unknown command ; sleep 1 ; exit }
[[ -s $tmp ]] || exit
tmux set-buffer "`perl -npe 's/\n/ /g' $tmp`"
tmux paste-buffer
tmux capture-pane -J
tmux save-buffer $tmp
tmux delete-buffer
-perl -ne '/^([^:]+:\d+:.*[^\s])\s*$/ and print "$1\n"' < $tmp > $tmp.err
+perl -ne '/^([^:]+:\d+:.*[^\s])\s*$/ and print "$1\n"' <$tmp >$tmp.err
rm $tmp
vim -c copen -q $tmp.err
rm $tmp.err
if $STEST -dqr -n "$cache" $PATH; then
$STEST -flx $PATH | sort -u | tee "$cache" | $DMENU "$@"
else
- $DMENU "$@" < "$cache"
+ $DMENU "$@" <"$cache"
fi
) | /bin/sh &
shift
w=/tmp/tabbed-$tabname
[ -r "$w" ] && {
- read winid < $w
+ read winid <$w
wmclass=`xprop -id $winid WM_CLASS 2>/dev/null`
echo "$wmclass" | grep -q tabbed-$tabname && {
echo $winid
}
}
[ -z "$NOTABSTART" ] || exit 1
-tabbed -n tabbed-$tabname -d $@ > $w
+tabbed -n tabbed-$tabname -d $@ >$w
sleep 0.1
exec $0 $tabname $@
mv $tmp $tmp.$1:r:e
tmp=$tmp.$1:r:e
case $1:e in
- (bz2) bunzip2 < $1 > $tmp ;;
- (gz) gunzip < $1 > $tmp ;;
- (xz) unxz < $1 > $tmp ;;
- (zst) unzstd < $1 > $tmp ;;
+ (bz2) bunzip2 <$1 >$tmp ;;
+ (gz) gunzip <$1 >$tmp ;;
+ (xz) unxz <$1 >$tmp ;;
+ (zst) unzstd <$1 >$tmp ;;
(*) exit 1 ;;
esac
zsh-mime-handler $tmp
while read w ; do
w=(${(s/=/)w})
hash -d ${w[1]}=${~${w[2]}}
-done < ~/.zsh/hashd
+done <~/.zsh/hashd