• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Shell script help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell script help


  • Subject: Shell script help
  • From: Eric Ocean <email@hidden>
  • Date: Fri, 3 Sep 2004 12:15:41 -0700

I'm completely unfamiliar with shell scripting.

How do I invoke this script? (i.e. what parameters)

#!/bin/bash
#

TMPOUT=rltest.out

for prog; do
	for inp in input.*; do
		echo -n "$prog on $inp ... ";
		./$prog < $inp 2>&1 > $TMPOUT;
		if diff output.${inp#input.} $TMPOUT > /dev/null; then
			echo "ok";
		else
			echo "FAILED";
			rm $TMPOUT
			exit 1;
		fi;
	done;
done;

rm -f $TMPOUT
exit 0;

It's in a file called runtests. Here is the directory structure:

test (dir)
	runtests (it's executable)
	call3 (dir)
		call3.rl
		input.1
		input.2
		Makefile
		meG0call3.bin
		meG0call3.bin
		[...more variations on the last two files pattern...]
		output.1
		output.2

Thanks for any help!

Eric Ocean
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Shell script help
      • From: Xavier Noria <email@hidden>
    • Re: Shell script help
      • From: email@hidden (Reuti)
  • Prev by Date: Re: Perforce and the project.pbxproj file...
  • Next by Date: Re: Shell script help
  • Previous by thread: Re: Perforce and the project.pbxproj file...
  • Next by thread: Re: Shell script help
  • Index(es):
    • Date
    • Thread