Hits since 2023-09-25 10:59:29:
427

Rosevear Software



Script gogeeq:

Here is a script that I wrote and use in SAM

Here is a script that I wrote and use in SAM, although it is not a part of the SAM distribution.  I put it here for your benefit:

  • #!/bin/sh
    # gogeeq
    
    
    
    # Joseph Rosevear 220313 I made this script (gogeeqie) by copying it
    # from go_xv.
    
    # Joseph Rosevear 220313 I changed the code to:
    
    #    -store the temporary files in /tmp
    #    -use geeqie instead of xv
    #    -use $plot instead of plot
    #    -use $data instead of data.txt
    #    -don't do "cd $level"
    #    -use $lines (which now comes from $3) instead of $1.
    
    # Joseph Rosevear 220321 I changed to code to be compatible with an
    # instruction file that makes a .svg file instead of a .eps file.
    
    # Joseph Rosevear 220713 I changed the name of this script from
    # gogeeqie to gogeeq.
    
    # Joseph Rosevear 240621 I added a line which removes any existing
    # /tmp/file.svg before attempting to create it.
    
    # Joseph Rosevear 240903 I removed variable lines: definition and use.
    
    
    
    # Definitions.
    data="$1"
    plot="$2"
    
    # Remove any existing file.svg.
    if [ -a /tmp/file.svg ]; then
    
       rm /tmp/file.svg
    fi
    
    # Make file.svg (as defined in instruction file).
    cat $data | gnuplot $plot
    
    # Plot file.svg using geeqie.
    geeqie /tmp/file.svg

If you want to use this script, you'll have to make some changes.  The script uses skip which I haven't provided.  Tool skip skips $1 lines and allows the user to skip over an arbitrary number of initial data points.  Perhaps you can write your own tool or code snippet?

This bit of code might work to replace skip, if you first export lines:

  • tac /dev/stdin | head -n -$lines | tac
© Joseph Rosevear
  |   Source touched: 2024-12-17 00:28:27