--- On Mon, 5/25/09, Matthew Seaman <m.sea...@infracaninophile.co.uk> wrote:
> From: Matthew Seaman <m.sea...@infracaninophile.co.uk> > Subject: Re: How to say this in Bash? > To: "Unga" <unga...@yahoo.com> > Cc: freebsd-questions@freebsd.org > Date: Monday, May 25, 2009, 8:10 PM > Unga wrote: > > Dear all > > > > This may be slightly OT, but I'm using on a FreeBSD > machine. How > > to convert following into bash style? > > > > echo "${X}" > ${Z} > > echo "${Y}" >> ${Z} > > > > Exactly the same in posix standard /bin/sh or in > bash. bash(1) should > be capable of running any compliant /bin/sh script > directly. The converse > is not generally true, so for maximum portability write > according to sh(1) > and avoid bash-isms. > > If you're asking about converting csh to bourne shell, then > that's a whole > other kettle of fish. The echo commands above just > happen to be the same in > either language, but that's one of the few points of > confluence between the > two. Typically you'ld have to know both languages and > laboriously translate > between them. > Here is what happens in bash shell: $ echo "${X}" > ${Z} bash: ${Z}: ambiguous redirect Best regards Unga _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"