9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] rc complaining about syntax error on {
@ 2007-11-28 22:28 Pietro Gagliardi
  2007-11-28 23:15 ` Federico G. Benavento
  0 siblings, 1 reply; 2+ messages in thread
From: Pietro Gagliardi @ 2007-11-28 22:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello. I was writing a program called 12 which displays twelve-hour  
time. It accepts the following options:
	-g	show time as part of date output
	-u	sent to date
date's -n option is rejected. The default behavior is to show only  
the 12-hour time. Now when I run this feature-complete version, it  
gives me an error saying that '}' on line 24(?) is a syntax error.  
Huh? I added
	flag x +
but apparently rc scans its whole input for errors before executing,  
so it brings me no closer to a solution. The file is /n/sources/ 
contrib/pietro/12. What's going on?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] rc complaining about syntax error on {
  2007-11-28 22:28 [9fans] rc complaining about syntax error on { Pietro Gagliardi
@ 2007-11-28 23:15 ` Federico G. Benavento
  0 siblings, 0 replies; 2+ messages in thread
From: Federico G. Benavento @ 2007-11-28 23:15 UTC (permalink / raw)
  To: 9fans

> but apparently rc scans its whole input for errors before executing,  
> so it brings me no closer to a solution. The file is /n/sources/ 
> contrib/pietro/12. What's going on?

your script is unreadable...

anyways, here the error, you havea single quote here:

echo $0: cannot use date's -n option

what's wrong with  while(! ~ $#* 0) and switch() ?

Federico G. Benavento

---
/bin/fortune:
Gnuemacs is portable except to machines that are too small.  -Richard M. Stallman


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-28 23:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-28 22:28 [9fans] rc complaining about syntax error on { Pietro Gagliardi
2007-11-28 23:15 ` Federico G. Benavento

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).