On 26 March 2016 at 01:28, Val Krem <valk...@yahoo.com> wrote: > > is it possible to combine the two scripts in one so that I can define the > varietals at one spot. It would be less prone to error.
Yes - you can have a script with a "case" and hard link to another name (you can symlink but they're not as efficient as hard links) #!/bin/bash # set your variables here. F=foo B=bar case "$0" in "*1.sh") check your parameters for the first script... do stuff to create output | your_script_2.sh ;; "*2.sh") # some prog which reads input or read the input in bash while read Col1 Col2 Col3 RestOfLine do do your stuff - reading a line at a time lets you pick off columns if needed... done ;; "*[!12].sh") echo We do not expect to be called $0 exit ;; esac