#!/bin/csh -f # split_at_string # ------------------------------------------------------------------------- # Shell script to split lines at the specified string # ------------------------------------------------------------------------- # Revision History: # $Log$ # ------------------------------------------------------------------------- if ($#argv < 1 || $1:q == "-h" || $1:q == "--help") then echo "Usage: $0:t string" echo -n 'Example: echo $PATH | '; echo "$0:t :" echo -n 'Example: echo $CLASSPATH | '; echo "$0:t :" exit 1 endif #set echo #sed 's/:/\n/g' #sed 's/$1/\n/g' #sed 's/:/\ #/g' echo "Never got this to work. Couldn't find a way to specify newline" echo "as part of the replacement text."