diff --git a/plotpipe/plotpipe b/plotpipe/plotpipe index 43fe9a2..5deb3f3 100755 --- a/plotpipe/plotpipe +++ b/plotpipe/plotpipe @@ -1,8 +1,5 @@ -#!/bin/bash +#!/usr/bin/perl -#!/bin/bash - -: <<=cut =pod =head1 NAME @@ -63,4 +60,16 @@ B =cut -gnuplot -p -e 'plot "/dev/stdin"' +$line1 = <>; +@col = split /\s+/, $line1; +if($#col == 1) { + # 2 col + open GNUPLOT,"|-", q(gnuplot -p -e 'plot "/dev/stdin"') or die; +} elsif($#col == 2) { + # 3 col (3rd = color) + open GNUPLOT,"|-", q(gnuplot -p -e 'plot "/dev/stdin" using 1:2:3 with points palette') or die; +} else { + die "$#col,@col,$line1"; +} +print GNUPLOT $line1, <>; +close GNUPLOT; diff --git a/stdout/stdout b/stdout/stdout index 183ff90..2517aeb 100755 --- a/stdout/stdout +++ b/stdout/stdout @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash : <<=cut =encoding utf8 diff --git a/vid/vid b/vid/vid index 2236465..52f91ad 100755 --- a/vid/vid +++ b/vid/vid @@ -33,7 +33,7 @@ Play videos matching B but not B: =head1 AUTHOR -Copyright (C) 2018 Ole Tange, +Copyright (C) 2018-2019 Ole Tange, http://ole.tange.dk and Free Software Foundation, Inc. @@ -76,7 +76,7 @@ find_find_vidlist() { echo "$1"/.vidlist return 0 else - if [ "/" == $(readlink -f "$dir") ]; then + if [ "/" == $(readlink -f "$dir") ] ; then echo ./.vidlist return 0 fi