diff options
author | tjr <tjr@FreeBSD.org> | 2002-06-06 03:57:22 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-06-06 03:57:22 +0000 |
commit | c74ee6d523a54949196b04673647cbd7ce5c4f01 (patch) | |
tree | 5a179ba5e57ce698955c4041f535870e6a841ea6 /bin/sh/sh.1 | |
parent | 5e61aad926dd9d2ae6d8ad5070df268dcc0466fb (diff) | |
download | FreeBSD-src-c74ee6d523a54949196b04673647cbd7ce5c4f01.zip FreeBSD-src-c74ee6d523a54949196b04673647cbd7ce5c4f01.tar.gz |
Add the SUSv3 -p ("portable") option to both the export and readonly
builtins. This makes export/readonly print lines in the form
"export name=value".
Diffstat (limited to 'bin/sh/sh.1')
-rw-r--r-- | bin/sh/sh.1 | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 57a21ee..34e4abe 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -1406,7 +1406,11 @@ If is given it is used as the exit status of the shell; otherwise the exit status of the preceding command is used. -.It Ic export Ar name ... +.It Xo +.Ic export +.Op Fl p +.Op Ar name ... +.Xc The specified names are exported so that they will appear in the environment of subsequent commands. The only way to un-export a variable is to @@ -1420,6 +1424,11 @@ export name=value .Pp With no arguments the export command lists the names of all exported variables. +If the +.Fl p +option is specified, the exported variables are printed as +.Dq Ic export Ar name Ns = Ns Ar value +lines, suitable for re-input to the shell. .It Ic fc Oo Fl e Ar editor Oc Op Ar first Op Ar last .It Ic fc Fl l Oo Fl nr Oc Op Ar first Op Ar last .It Ic fc Fl s Oo Ar old Ns = Ns Ar new Oc Op Ar first @@ -1662,7 +1671,11 @@ is assumed. The .Fl e option exists only for backward compatibility with older scripts. -.It Ic readonly Ar name ... +.It Xo +.Ic readonly +.Op Fl p +.Op Ar name ... +.Xc Each specified .Ar name is marked as read only, @@ -1677,6 +1690,11 @@ readonly name=value With no arguments the .Ic readonly command lists the names of all read only variables. +If the +.Fl p +option is specified, the read-only variables are printed as +.Dq Ic readonly Ar name Ns = Ns Ar value +lines, suitable for re-input to the shell. .It Ic set Oo Fl /+abCEefIimnpTuVvx Oc Oo Fl /+o Ar longname Oc Oo .Fl c Ar string Oc Op Fl - Ar arg ... The |