Pipes

From Arnout Engelen

Jump to: navigation, search

The commandline is really powerful, but scripts can be tricky to debug. a UI for that might be nice.

Contents

[edit] Interface

Using colours for:

  • globbing (allow click, replaces command by 'echo "Globbed filenames: .."'?)
  • backticks (allow click, replaces by 'echo "Would be executing: "')
  • special controls (like 'for')
  • Distinguishing between files (in which data is stored) and programs (which are ran and get the data in stdin). A file can have a backticked command as filename.

Pipes:

  • > | and <. show data coming though? (esp. |)

[edit] Features

Basically it should be some kind of IDE for a subset of Bash, I guess.

  • support pasting in a random bash oneliner for visualisation: usually you won't know you need Pipes until you do.
  • 'graphical' representation of script?
  • for loops
  • backticks
  • big red 'run' button
  • 'breakpoints'?
  • adding 'viewers' to a pipe, when run will show
  • toggle for showing STDERR (might clutter things)

[edit] Examples

cat /usr/share/dict/british-english-large | grep ^.....ious$ | perl -pe s/...\(.*\)us/\$1.us/ | sort | uniq | while read line ; do whois $line >> /tmp/foo ; done
  • look into pipes

[edit] xmlformat

for i in /tmp/foo/*.xml ; do xmlformat $i > /tmp/bar/`basename $i` ; done

http://www.bzzt.net/~arnouten/pipes/xmlformat.svg

What should be accessible in not too many clicks:

  • what does /tmp/foo/*.xml expand to?
  • what does basename $i expand to?
  • what filenames are written to?
  • what commands are executed?

[edit] mpd

NAME=`mpc | head  -1 | sed "s/.*\///;s/.*- //"`;
bluemote --send "> Status \"$NAME\""

Accessible:

  • output of pipe

[edit] Related software

  • pipe (limited: doesn't seem to be aware of options/parameteres, backticks, not sure if it does viewing pipes)
  • paip (doesn't seem to be geared towards calling external apps)
Personal tools