Date: Mon, 25 May 2009 13:10:48 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Unga <unga888@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: How to say this in Bash? Message-ID: <4A1A8AC8.5020007@infracaninophile.co.uk> In-Reply-To: <898369.52568.qm@web57006.mail.re3.yahoo.com> References: <898369.52568.qm@web57006.mail.re3.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFC499685EC332B9F0E72AE1D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Unga wrote: > Dear all >=20 > This may be slightly OT, but I'm using on a FreeBSD machine. How > to convert following into bash style? >=20 > echo "${X}" > ${Z} > echo "${Y}" >> ${Z} >=20 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 convers= e 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 whol= e 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 t= he two. Typically you'ld have to know both languages and laboriously transl= ate between them. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enigFC499685EC332B9F0E72AE1D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkoais4ACgkQ8Mjk52CukIw10QCfYVGWXEoC1Jxvv4qHlVcbBnco U6kAn3kb6OD1P9qZXBAcibftT+HnpPbX =3uIU -----END PGP SIGNATURE----- --------------enigFC499685EC332B9F0E72AE1D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A1A8AC8.5020007>