Browse Source

OS-8128 clean up smartos-live manpage build (#910)

Reviewed by: Jason King <jason.king@joyent.com>
Approved by: Jason King <jason.king@joyent.com>
pull/913/head
John Levon 3 years ago committed by GitHub
parent
commit
de48aa318a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      .gitignore
  2. 70
      Makefile
  3. 80
      man/Makefile
  4. 10
      man/README
  5. 10
      man/man/README
  6. 1
      man/man/man
  7. 544
      man/man/man1/as.1
  8. 888
      man/man/man1/ex.1
  9. 2183
      man/man/man1/vi.1
  10. 670
      man/man/man1m/hotplug.1m
  11. 289
      man/man/man1m/sys-unconfig.1m
  12. 78
      man/man/man1m/tzreload.1m
  13. 650
      man/man/man3lib/libm.3lib
  14. 96
      man/man/man3lib/libmvec.3lib
  15. 125
      man/man/man3lib/libusb.3lib
  16. 1
      man/man/share
  17. 1
      man/man/usr
  18. 11
      man/mancheck.conf
  19. 28
      man/manifest
  20. 1
      man/sdc/.gitignore
  21. 59
      man/sdc/Makefile
  22. 0
      man/smartdc/man/man1/sdc-factoryreset.1.md
  23. 0
      man/smartdc/man/man1/sdc-lastcomm.1
  24. 0
      man/smartdc/man/man1/sdc-zfs-io-throttle.1
  25. 29
      man/src/Makefile
  26. 1
      man/src/fwadm.1m.md
  27. 1
      man/src/fwrule.5.md
  28. 1
      man/src/imgadm.1m.md
  29. 158
      man/src/ronn-format.7.md
  30. 1
      man/src/vmadm.1m.md
  31. 1
      man/src/vmadmd.1m.md
  32. 471
      man/src/zonestat.1.md
  33. 74
      man/src/zonestatd.1m.md
  34. 0
      man/usr/share/man/man1/bunzip2.1
  35. 0
      man/usr/share/man/man1/bzcat.1
  36. 0
      man/usr/share/man/man1/bzcmp.1
  37. 0
      man/usr/share/man/man1/bzegrep.1
  38. 0
      man/usr/share/man/man1/bzfgrep.1
  39. 0
      man/usr/share/man/man1/bzip2recover.1
  40. 0
      man/usr/share/man/man1/bzless.1
  41. 0
      man/usr/share/man/man1/gzcat.1
  42. 0
      man/usr/share/man/man1/gzcmp.1
  43. 0
      man/usr/share/man/man1/gzegrep.1
  44. 0
      man/usr/share/man/man1/gzfgrep.1
  45. 0
      man/usr/share/man/man1/json.1
  46. 0
      man/usr/share/man/man1m/disklayout.1m.md
  47. 0
      man/usr/share/man/man1m/fssstat.1m
  48. 0
      man/usr/share/man/man1m/fwadm.1m.md.in
  49. 0
      man/usr/share/man/man1m/mkzpool.1m
  50. 0
      man/usr/share/man/man1m/nictagadm.1m.md
  51. 0
      man/usr/share/man/man1m/sysevent.1m.md
  52. 0
      man/usr/share/man/man1m/sysinfo.1m.md
  53. 0
      man/usr/share/man/man1m/vminfo.1m.md
  54. 0
      man/usr/share/man/man1m/ziostat.1m.md
  55. 0
      man/usr/share/man/man1m/zonememstat.1m
  56. 0
      man/usr/share/man/man1m/zonemon.1m
  57. 0
      man/usr/share/man/man5/joyent.5
  58. 0
      man/usr/share/man/man5/openssl.5
  59. 7
      src/Makefile
  60. 37
      src/manifest
  61. 25
      tools/build_live
  62. 3
      tools/mancheck/main.c

19
.gitignore vendored

@ -59,25 +59,10 @@
/tools/pwgen-2.06/configure
boot.manifest.d/
boot.manifest.gen
man/man/man1m/diskinfo.1m
man/man/man1m/disklayout.1m
man/man/man1m/dsadm.1m
man/man/man1m/fwadm.1m
man/man/man1m/imgadm.1m
man/man/man1m/nictagadm.1m
man/man/man1m/sysevent.1m
man/man/man1m/sysinfo.1m
man/man/man1m/vfsstat.1m
man/man/man1m/vmadm.1m
man/man/man1m/vmadmd.1m
man/man/man1m/vminfo.1m
man/man/man1m/ziostat.1m
man/man/man5/fwrule.5
mancheck.conf.d/
mancheck.conf
manifest.d/
manifest.gen
pkgsrc/*.tgz
ronn-format.7
src/cryptpass
src/diskinfo
src/disklayout
@ -98,5 +83,3 @@ src/zonemon
tests.manifest.gen
tools/pwgen-2.06/Makefile
tools/pwgen-2.06/autom4te.cache
zonestat.1
zonestatd.1m

70
Makefile

@ -10,7 +10,7 @@
#
#
# Copyright 2019 Joyent, Inc.
# Copyright 2020 Joyent, Inc.
#
#
@ -32,7 +32,6 @@ BOOT_MPROTO = $(ROOT)/boot.manifest.d
BOOT_PROTO = $(ROOT)/proto.boot
IMAGES_PROTO = $(ROOT)/proto.images
TESTS_PROTO = $(ROOT)/proto.tests
MCPROTO = $(ROOT)/mancheck.conf.d
# On Darwin/OS X we support running 'make check'
ifeq ($(shell uname -s),Darwin)
@ -99,12 +98,14 @@ MANCF_FILE := $(ROOT)/proto/usr/share/man/man.cf
WORLD_MANIFESTS := \
$(MPROTO)/illumos.manifest \
$(MPROTO)/live.manifest \
$(MPROTO)/man.manifest \
$(MPROTO)/illumos-extra.manifest
WORLD_MANCHECK_CONFS := \
$(MCPROTO)/illumos.mancheck.conf \
$(MCPROTO)/live.mancheck.conf \
$(MCPROTO)/illumos-extra.mancheck.conf
MANCHECK_CONFS := \
$(ROOT)/man/mancheck.conf \
$(ROOT)/projects/illumos/mancheck.conf \
$(ROOT)/projects/illumos-extra/mancheck.conf \
$(shell ls projects/local/*/mancheck.conf 2>/dev/null)
BOOT_MANIFESTS := \
$(BOOT_MPROTO)/illumos.manifest
@ -124,9 +125,6 @@ include projects/illumos/usr/src/Makefile.testarchive
TEST_IPS_MANIFESTS = $(TEST_IPS_MANIFEST_FILES:%=$(TEST_IPS_MANIFEST_ROOT)/%)
TESTS_MANIFEST = $(ROOT)/tests.manifest.gen
SUBDIR_MANCHECK_CONFS := \
$(LOCAL_SUBDIRS:%=$(MCPROTO)/%.sd.mancheck.conf)
BOOT_VERSION := boot-$(shell [[ -f $(ROOT)/configure-buildver ]] && \
echo $$(head -n1 $(ROOT)/configure-buildver)-)$(shell head -n1 $(STAMPFILE))
BOOT_TARBALL := output/$(BOOT_VERSION).tgz
@ -155,14 +153,13 @@ TOOLS_TARGETS = \
tools/cryptpass
world: 0-strap-stamp 0-illumos-stamp 0-extra-stamp 0-livesrc-stamp \
0-local-stamp 0-tools-stamp 0-man-stamp 0-devpro-stamp \
$(TOOLS_TARGETS)
0-local-stamp 0-tools-stamp 0-devpro-stamp $(TOOLS_TARGETS)
live: world manifest mancheck_conf boot $(TOOLS_TARGETS) $(MANCF_FILE)
live: world manifest boot $(TOOLS_TARGETS) $(MANCF_FILE) mancheck
@echo $(SUBDIR_MANIFESTS)
mkdir -p ${ROOT}/log
./tools/build_live -m $(ROOT)/$(MANIFEST) -o $(ROOT)/output \
$(PLATFORM_PASSWORD_OPT) $(ROOT)/proto $(ROOT)/man/man
$(PLATFORM_PASSWORD_OPT) $(ROOT)/proto
boot: $(BOOT_TARBALL)
@ -211,30 +208,26 @@ images-tar: $(IMAGES_TARBALL)
#
manifest: $(MANIFEST) $(BOOT_MANIFEST)
mancheck_conf: $(WORLD_MANCHECK_CONFS) $(SUBDIR_MANCHECK_CONFS)
mancheck.conf: $(MANCHECK_CONFS)
cat $(MANCHECK_CONFS) >$@ 2>/dev/null
dump_mancheck_conf: manifest mancheck_conf $(MANCHECK)
args=; for x in $(MCPROTO)/*.mancheck.conf; do \
args="$$args -c $$x"; done; \
$(MANCHECK) -f manifest.gen -s -D $$args
.PHONY: mancheck
mancheck: manifest mancheck.conf $(MANCHECK)
$(MANCHECK) -f manifest.gen -s -c $(ROOT)/mancheck.conf
$(MPROTO) $(BOOT_MPROTO) $(MCPROTO):
$(MPROTO) $(BOOT_MPROTO):
mkdir -p $@
$(MPROTO)/live.manifest: src/manifest | $(MPROTO)
gmake DESTDIR=$(MPROTO) DESTNAME=live.manifest \
-C src manifest
$(MCPROTO)/live.mancheck.conf: src/mancheck.conf | $(MCPROTO)
gmake DESTDIR=$(MCPROTO) DESTNAME=live.mancheck.conf \
-C src mancheck_conf
$(MPROTO)/man.manifest: man/manifest | $(MPROTO)
cp man/manifest $@
$(MPROTO)/illumos.manifest: projects/illumos/manifest | $(MPROTO)
cp projects/illumos/manifest $(MPROTO)/illumos.manifest
$(MCPROTO)/illumos.mancheck.conf: projects/illumos/mancheck.conf | $(MCPROTO)
cp projects/illumos/mancheck.conf $(MCPROTO)/illumos.mancheck.conf
$(BOOT_MPROTO)/illumos.manifest: projects/illumos/manifest | $(BOOT_MPROTO)
cp projects/illumos/boot.manifest $(BOOT_MPROTO)/illumos.manifest
@ -243,10 +236,6 @@ $(MPROTO)/illumos-extra.manifest: 0-extra-stamp \
gmake DESTDIR=$(MPROTO) DESTNAME=illumos-extra.manifest \
-C projects/illumos-extra manifest; \
$(MCPROTO)/illumos-extra.mancheck.conf: FRC | 0-extra-stamp $(MCPROTO)
gmake DESTDIR=$(MCPROTO) DESTNAME=illumos-extra.mancheck.conf \
-C projects/illumos-extra mancheck_conf; \
$(MPROTO)/%.sd.manifest: projects/local/%/Makefile projects/local/%/manifest
cd $(ROOT)/projects/local/$* && \
if [[ -f Makefile.joyent ]]; then \
@ -257,16 +246,6 @@ $(MPROTO)/%.sd.manifest: projects/local/%/Makefile projects/local/%/manifest
manifest; \
fi
$(MCPROTO)/%.sd.mancheck.conf: FRC | $(MCPROTO)
cd $(ROOT)/projects/local/$* && \
if [[ -f Makefile.joyent ]]; then \
gmake DESTDIR=$(MCPROTO) DESTNAME=$*.sd.mancheck.conf \
-f Makefile.joyent mancheck_conf; \
else \
gmake DESTDIR=$(MCPROTO) DESTNAME=$*.sd.mancheck.conf \
mancheck_conf; \
fi
$(MANIFEST): $(WORLD_MANIFESTS) $(SUBDIR_MANIFESTS)
-rm -f $@
./tools/build_manifest $(MPROTO) | ./tools/sorter > $@
@ -390,11 +369,7 @@ $(CTFTOOLS_TARBALL): 0-strap-stamp $(STAMPFILE)
gmake -j$(MAX_JOBS) NATIVEDIR=$(STRAP_PROTO) \
DESTDIR=$(PROTO) && \
gmake NATIVEDIR=$(STRAP_PROTO) DESTDIR=$(PROTO) install)
touch $@
0-man-stamp:
(cd $(ROOT)/man/sdc && gmake install DESTDIR=$(PROTO) $(SUBDIR_DEFS))
(cd $(ROOT)/man/src && gmake clean && gmake)
(cd $(ROOT)/man/ && gmake install DESTDIR=$(PROTO) $(SUBDIR_DEFS))
touch $@
0-tools-stamp: 0-pwgen-stamp
@ -441,7 +416,7 @@ check: $(JSLINT)
clean:
./tools/clobber_illumos
rm -f $(MANIFEST) $(BOOT_MANIFEST) $(TESTS_MANIFEST)
rm -rf $(MPROTO)/* $(BOOT_MPROTO)/* $(MCPROTO)/*
rm -rf $(MPROTO)/* $(BOOT_MPROTO)/*
(cd $(ROOT)/src && gmake clean)
[ ! -d $(ROOT)/projects/illumos-extra ] || \
(cd $(ROOT)/projects/illumos-extra && gmake clean)
@ -469,7 +444,8 @@ clean:
(cd tools/mancf && gmake clean)
(cd tools/tzcheck && gmake clean)
(cd tools/ucodecheck && gmake clean)
(cd man/sdc && gmake clean)
(cd man && gmake clean)
rm -f mancheck.conf
rm -f 0-*-stamp 1-*-stamp
clobber: clean
@ -773,4 +749,4 @@ print-%:
FRC:
.PHONY: manifest mancheck_conf check jsl FRC
.PHONY: manifest check jsl FRC

80
man/Makefile

@ -0,0 +1,80 @@
#
# Copyright 2020 Joyent, Inc.
#
ROOT = $(PWD)/..
RONNJS = /opt/local/bin/node $(ROOT)/tools/ronnjs/bin/ronn.js
DESTDIR = $(ROOT)/proto
MAN_FILES = \
smartdc/man/man1/sdc-factoryreset.1 \
smartdc/man/man1/sdc-lastcomm.1 \
smartdc/man/man1/sdc-zfs-io-throttle.1 \
usr/share/man/man1/bunzip2.1 \
usr/share/man/man1/bzcat.1 \
usr/share/man/man1/bzcmp.1 \
usr/share/man/man1/bzegrep.1 \
usr/share/man/man1/bzfgrep.1 \
usr/share/man/man1/bzip2recover.1 \
usr/share/man/man1/bzless.1 \
usr/share/man/man1/gzcat.1 \
usr/share/man/man1/gzcmp.1 \
usr/share/man/man1/gzegrep.1 \
usr/share/man/man1/gzfgrep.1 \
usr/share/man/man1/json.1 \
usr/share/man/man1m/disklayout.1m \
usr/share/man/man1m/fssstat.1m \
usr/share/man/man1m/fwadm.1m \
usr/share/man/man1m/imgadm.1m \
usr/share/man/man1m/mkzpool.1m \
usr/share/man/man1m/nictagadm.1m \
usr/share/man/man1m/sysevent.1m \
usr/share/man/man1m/sysinfo.1m \
usr/share/man/man1m/vmadm.1m \
usr/share/man/man1m/vmadmd.1m \
usr/share/man/man1m/vminfo.1m \
usr/share/man/man1m/ziostat.1m \
usr/share/man/man1m/zonememstat.1m \
usr/share/man/man1m/zonemon.1m \
usr/share/man/man5/fwrule.5 \
usr/share/man/man5/joyent.5 \
usr/share/man/man5/openssl.5
PROTO_FILES = $(MAN_FILES:%=$(DESTDIR)/%)
clean:
all:
install: $(PROTO_FILES)
$(DESTDIR)/%: %
mkdir -p $(@D)
rm -f $@
cp $< $@
touch $@
$(DESTDIR)/%: %.md
mkdir -p $(@D)
rm -f $@
$(RONNJS) --roff $< > $@
$(DESTDIR)/usr/share/man/man1m/%: $(ROOT)/src/fw/man/%.md
mkdir -p $(@D)
rm -f $@
$(RONNJS) --roff $< > $@
$(DESTDIR)/usr/share/man/man5/%: $(ROOT)/src/fw/man/%.md
mkdir -p $(@D)
rm -f $@
$(RONNJS) --roff $< > $@
$(DESTDIR)/usr/share/man/man1m/%: $(ROOT)/src/img/man/%.md
mkdir -p $(@D)
rm -f $@
$(RONNJS) --roff $< > $@
$(DESTDIR)/usr/share/man/man1m/%: $(ROOT)/src/vm/man/%.md
mkdir -p $(@D)
rm -f $@
$(RONNJS) --roff $< > $@

10
man/README

@ -0,0 +1,10 @@
This directory installs man pages corresponding to software delivered by
smartos-live itself. For mainly historical reasons, some of these live under
/smartdc/man, although they're still delivered into SmartOS, not just a Triton
build.
Some are built from markdown via ronnjs, others not.
In addition, there are some waifs and strays - such as the bzip2 manpages -
that are referenced from manifests other than man/manifest, and mainly here for
convenience.

10
man/man/README

@ -1,10 +0,0 @@
Most of the man pages are in the illumos-joyent repo under usr/src/man.
This directory only contains extra man pages that are not included in
illumos-joyent. Only add or update a man page here if it doesn't exist
in illumos-joyent.
Most of the original Sun versions of the files here come from the opensolaris
man consolidation which were released under the CDDL. Modifications since also
subject to CDDL and:
Copyright (c) 2014, Joyent Inc., All Rights Reserved.

1
man/man/man

@ -1 +0,0 @@
.

544
man/man/man1/as.1

@ -1,544 +0,0 @@
'\" te
.\" Copyright 1989 AT&T
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER,
.\" with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH as 1 "24 Aug 2009" "SunOS 5.11" "User Commands"
.SH NAME
as \- assembler
.SH SYNOPSIS
.SS "SPARC"
.LP
.nf
\fBas\fR [\fB-b\fR] [\fB-i\fR] [\fB-K\fR {pic,PIC}] [\fB-L\fR] [\fB-m\fR] [\fB-n\fR] [\fB-o\fR \fIoutfile\fR]
[\fB-P\fR] [\fB-D\fR\fIname\fR] [\fB-D\fR\fIname=def\fR] [\fB-I\fR\fIpath\fR] [\fB-U\fR\fIname\fR]... [\fB-q\fR]
[\fB-Q\fR\fIy\fR | \fIn\fR] [\fB-s\fR] [\fB-S\fR [\fIa\fR | \fIb\fR | \fIc\fR | \fIl\fR | \fIA\fR | \fIB\fR | \fIC\fR | \fIL\fR]]
[\fB-T\fR] [\fB-V\fR]
[\fB-xarch=v7\fR | \fB-xarch=v8\fR | \fB-xarch=v8a\fR | \fB-xarch=v8plus\fR |
\fB-xarch=v8plusa\fR | \fB-xarch=v8plusb\fR | \fB-xarch=v8plusd\fR |
\fB-xarch=v8plusv\fR | \fB-xarch=v9\fR | \fB-xarch=v9a\fR |
\fB-xarch=v9b\fR | \fB-xarch=v9d\fR | \fB-xarch=v9v\fR]
[\fB-xF\fR] [\fB-Y\fR \fIdirname\fR] \fIfilename\fR...
.fi
.SS "x86"
.LP
.nf
\fBas\fR [\fB-b\fR] [\fB-i\fR] [\fB-K\fR PIC] [\fB-L\fR] [\fB-m\fR] [\fB-n\fR] [\fB-o\fR \fIoutfile\fR] [\fB-P\fR]
[\fB-D\fR\fIname\fR] [\fB-D\fR\fIname=def\fR] [\fB-I\fR\fIpath\fR] [\fB-U\fR\fIname\fR]... [\fB-Q\fR\fIy\fR | \fIn\fR]
[\fB-s\fR] [\fB-S\fR [\fIa\fR | \fIb\fR | \fIc\fR | \fIl\fR | \fIA\fR | \fIB\fR | \fIC\fR | \fIL\fR]] [\fB-T\fR] [\fB-V\fR]
[\fB-xarch\fR=generic64 | \fB-xarch\fR=amd64] [\fB-Y\fR \fIdirname\fR]
[\fB-xmodel\fR= [ SMALL | KERNEL ]] \fIfilename\fR...
.fi
.SH DESCRIPTION
.sp
.LP
The \fBas\fR command creates object files from assembly language source files.
.SH OPTIONS
.SS "Common Options"
.sp
.LP
The following flags are common to both SPARC and x86. They can be specified in any order:
.sp
.ne 2
.mk
.na
\fB\fB-b\fR\fR
.ad
.RS 23n
.rt
Generates extra symbol table information.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-i\fR\fR
.ad
.RS 23n
.rt
Ignore line number information from preprocessor.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-K\fR \fBpic\fR | \fBPIC\fR\fR
.ad
.RS 23n
.rt
Generates position-independent code.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-L\fR\fR
.ad
.RS 23n
.rt
Saves all symbols, including temporary labels that are normally discarded to save space, in the ELF symbol table.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-m\fR\fR
.ad
.RS 23n
.rt
Runs the \fBm4\fR(1) macro processor on the input to the assembler.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-n\fR\fR
.ad
.RS 23n
.rt
Suppresses all the warnings while assembling.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-o\fR \fIoutfile\fR\fR
.ad
.RS 23n
.rt
Puts the output of the assembly in \fIoutfile\fR. By default, the output file name is formed by removing the \fB\&.s\fR suffix, if there is one, from the input file name and appending a \fB\&.o\fR suffix.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-P\fR\fR
.ad
.RS 23n
.rt
Runs \fBcpp\fR(1), the C preprocessor, on the files being assembled. The preprocessor is run separately on each input file, not on their concatenation. The preprocessor output is passed to the assembler.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-D\fR\fIname\fR\fR
.ad
.br
.na
\fB\fB-D\fR\fIname=def\fR\fR
.ad
.RS 23n
.rt
When the \fB-P\fR option is in effect, these options are passed to the \fBcpp\fR(1) preprocessor without interpretation by the \fBas\fR command; otherwise, they are ignored.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-I\fR\fIpath\fR\fR
.ad
.RS 23n
.rt
When the \fB-P\fR option is in effect, this option is passed to the \fBcpp\fR(1) preprocessor without interpretation by the \fBas\fR command; otherwise, it is ignored.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-U\fR\fIname\fR\fR
.ad
.RS 23n
.rt
When the \fB-P\fR option is in effect, this option is passed to the \fBcpp\fR(1) preprocessor without interpretation by the \fBas\fR command; otherwise, it is ignored.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-Q\fR\fIy\fR | \fIn\fR\fR
.ad
.RS 23n
.rt
If \fIy\fR is specified, this option produces the assembler version information in the comment section of the output object file. If \fIn\fR is specified, the information is suppressed.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-s\fR\fR
.ad
.RS 23n
.rt
Places all stabs in the \fB\&.stabs\fR section. By default, stabs are placed in \fBstabs.excl\fR sections, which are stripped out by the static linker, \fBld\fR(1), during final execution. When the \fB-s\fR option is used, stabs remain in the final executable because \fB\&.stab\fR sections are not stripped by the static linker.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-S\fR[\fIa\fR|\fIb\fR|\fIc\fR|\fIl\fR|\fIA\fR|\fIB\fR|\fIC\fR|\fIL\fR]\fR
.ad
.RS 23n
.rt
Produces a disassembly of the emitted code to the standard output. Adding each of the following characters to the \fB-S\fR option produces:
.sp
.ne 2
.mk
.na
\fB\fIa\fR\fR
.ad
.RS 5n
.rt
disassembling with address
.RE
.sp
.ne 2
.mk
.na
\fB\fIb\fR\fR
.ad
.RS 5n
.rt
disassembling with ".bof"
.RE
.sp
.ne 2
.mk
.na
\fB\fIc\fR\fR
.ad
.RS 5n
.rt
disassembling with comments
.RE
.sp
.ne 2
.mk
.na
\fB\fIl\fR\fR
.ad
.RS 5n
.rt
disassembling with line numbers
.RE
Capital letters turn the switch off for the corresponding option.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-T\fR\fR
.ad
.RS 23n
.rt
This is a migration option for 4.\fIx\fR assembly files to be assembled on 5.\fIx\fR systems. With this option, the symbol names in 4.\fIx\fR assembly files are interpreted as 5.\fIx\fR symbol names.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-V\fR\fR
.ad
.RS 23n
.rt
Writes the version number of the assembler being run on the standard error output.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xF\fR\fR
.ad
.RS 23n
.rt
Allows function reordering by the Performance Analyzer. If you compile with the \fB-xF\fR option, and then run the Performance Analyzer, you can generate a map file that shows an optimized order for the functions. The subsequent link to build the executable file can be directed to use that map file by using the linker \fB-M\fR \fImapfile\fR option. It places each function from the executable file into a separate section.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-Y\fR \fIdirname\fR\fR
.ad
.RS 23n
.rt
Specify directory \fBm4\fR and/or \fBcm4def\fR.
.RE
.SS "Options for SPARC only"
.sp
.ne 2
.mk
.na
\fB\fB-q\fR\fR
.ad
.RS 18n
.rt
Performs a quick assembly. When the \fB-q\fR option is used, many error checks are not performed. This option disables many error checks. Use of this option to assemble handwritten assembly language is not recommended.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v7\fR\fR
.ad
.RS 18n
.rt
This option instructs the assembler to accept instructions defined in the SPARC version 7 (V7) architecture. The resulting object code is in ELF format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8\fR\fR
.ad
.RS 18n
.rt
This option instructs the assembler to accept instructions defined in the SPARC-V8 architecture, less the quad-precision floating-point instructions. The resulting object code is in ELF format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8a\fR\fR
.ad
.RS 18n
.rt
This option instructs the assembler to accept instructions defined in the SPARC-V8 architecture, less the quad-precision floating-point instructions and less the \fIfsmuld\fR instruction. The resulting object code is in ELF format. This is the default choice of the \fB\fR\fB-xarch\fR\fB=\fR\fIoptions\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8plus\fR\fR
.ad
.RS 18n
.rt
This option instructs the assembler to accept instructions defined in the SPARC-V9 architecture, less the quad-precision floating-point instructions. The resulting object code is in ELF format. It does not execute on a Solaris V8 system (a machine with a V8 processor). It executes on a Solaris V8+ system. This combination is a SPARC 64-bit processor and a 32-bit OS.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8plusa\fR\fR
.ad
.RS 18n
.rt
This option instructs the assembler to accept instructions defined in the SPARC-V9 architecture, less the quad-precision floating-point instructions, plus the instructions in the Visual Instruction Set (VIS). The resulting object code is in V8+ ELF format. It does not execute on a Solaris V8 system (a machine with a V8 processor). It executes on a Solaris V8+ system
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8plusb\fR\fR
.ad
.RS 18n
.rt
This option enables the assembler to accept instructions defined in the SPARC-V9 architecture, plus the instructions in the Visual Instruction Set (VIS), with UltraSPARC-III extensions. The resulting object code is in V8+ ELF32 format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8plusd\fR\fR
.ad
.RS 18n
.rt
This option enables the assembler to accept instructions DEFIned in UltraSPARC Architecture 2009. The resulting object code is in V8+ ELF32 format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v8plusv\fR\fR
.ad
.RS 18n
.rt
This option enables the assembler to accept instructions defined in UltraSPARC Architecture 2005, including the extensions dealing with the sun4v virtual machine model. The resulting object code is in V8+ ELF32 format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v9\fR\fR
.ad
.RS 18n
.rt
This option limits the instruction set to the SPARC-V9 architecture. The resulting .o object files are in 64-bit ELF format and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit SPARC processor running 64-bit Solaris with the 64-bit kernel.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v9a\fR\fR
.ad
.RS 18n
.rt
This option limits the instruction set to the SPARC-V9 architecture, adding the Visual Instruction Set (VIS) and extensions specific to UltraSPARC processors. The resulting .o object files are in 64-bit ELF format and can only be linked with other object files in the same format. The resulting executable can only be run on a 64-bit SPARC processor running 64-bit Solaris with the 64-bit kernel.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v9b\fR\fR
.ad
.RS 18n
.rt
This option enables the assembler to accept instructions defined in the SPARC-V9 architecture, plus the Visual Instruction Set (VIS), with UltraSPARC-III extensions. The resulting .o object files are in ELF64 format and can only be linked with other V9 object files in the same format. The resulting executable can only be run on a 64-bit processor running a 64-bit Solaris operating environment with the 64-bit kernel.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v9d\fR\fR
.ad
.RS 18n
.rt
This option enables the assembler to accept instructions defined in UltraSPARC Architecture 2009. The resulting object code is in ELF64 format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=v9v\fR\fR
.ad
.RS 18n
.rt
This option enables the assembler to accept instructions defined in UltraSPARC Architecture 2005, including the extensions dealing with the sun4v virtual machine model. The resulting object code is in ELF64 format.
.RE
.SS "Options for x86 Only"
.sp
.ne 2
.mk
.na
\fB\fB-xarch>=generic64\fR\fR
.ad
.RS 28n
.rt
Limits the instruction set to AMD64. The resulting object code is in 64-bit ELF format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xarch=amd64\fR\fR
.ad
.RS 28n
.rt
Limits the instruction set to AMD64. The resulting object code is in 64-bit ELF format.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-xmodel\fR=[SMALL | KERNEL]\fR
.ad
.RS 28n
.rt
For AMD64 only, generate \fBR_X86_64_32S\fR relocatable type for static data access under \fBKERNEL\fR. Otherwise, generate \fBR_X86_64_32\fR under \fBSMALL\fR. \fBSMALL\fR is the default.
.RE
.SH OPERANDS
.sp
.LP
The following operand is supported:
.sp
.ne 2
.mk
.na
\fB\fIfilename\fR\fR
.ad
.RS 12n
.rt
Assembly language source file
.RE
.SH ENVIRONMENT VARIABLES
.sp
.ne 2
.mk
.na
\fB\fBTMPDIR\fR\fR
.ad
.RS 10n
.rt
The \fBas\fR command normally creates temporary files in the directory \fB/tmp\fR. Another directory can be specified by setting the environment variable \fBTMPDIR\fR to the chosen directory. (If \fBTMPDIR\fR is not a valid directory, then \fBas\fR uses \fB/tmp\fR).
.RE
.SH FILES
.sp
.LP
By default, \fBas\fR creates its temporary files in \fB/tmp\fR.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
AvailabilitySUNWsprot
.TE
.SH SEE ALSO
.sp
.LP
\fBcpp\fR(1),\fBld\fR(1), \fBm4\fR(1), \fBnm\fR(1), \fBstrip\fR(1), \fBtmpnam\fR(3C), \fBa.out\fR(4), \fBattributes\fR(5)
.sp
.LP
\fBdbx\fR and \fBanalyzer\fR manual pages available with Sun Studio documentation.
.SH NOTES
.sp
.LP
If the \fB-m\fR option, which invokes the \fBm4\fR(1) macro processor, is used, keywords for \fBm4\fR cannot be used as symbols (variables, functions, labels) in the input file, since \fBm4\fR cannot determine which keywords are assembler symbols and which keywords are real \fBm4\fR macros.
.sp
.LP
Whenever possible, access the assembler through a compilation system interface program.
.sp
.LP
All undefined symbols are treated as global.

888
man/man/man1/ex.1

@ -1,888 +0,0 @@
'\" te
.\" Copyright 1989 AT&T
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserve
.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
.\" This notice shall appear on any product containing this material.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH ex 1 "15 Jun 2004" "SunOS 5.11" "User Commands"
.SH NAME
ex \- text editor
.SH SYNOPSIS
.LP
.nf
\fB/usr/bin/ex\fR [\fB-|\fR \fB-s\fR] [\fB-l\fR] [\fB-L\fR] [\fB-R\fR] [\fB-r\fR [\fIfile\fR]] [\fB-t\fR \fItag\fR]
[\fB-v\fR] [\fB-V\fR] [\fB-x\fR] [\fB-w\fR\fIn\fR] [\fB-C\fR] [+\fIcommand\fR | \fB-c\fR \fIcommand\fR] \fIfile\fR...
.fi
.LP
.nf
\fB/usr/xpg4/bin/ex\fR [\fB-|\fR \fB-s\fR] [\fB-l\fR] [\fB-L\fR] [\fB-R\fR] [\fB-r\fR [\fIfile\fR]]
[\fB-t\fR \fItag\fR] [\fB-v\fR] [\fB-V\fR] [\fB-x\fR] [\fB-w\fR\fIn\fR] [\fB-C\fR]
[+\fIcommand\fR | \fB-c\fR \fIcommand\fR] \fIfile\fR...
.fi
.LP
.nf
\fB/usr/xpg6/bin/ex\fR [\fB-|\fR \fB-s\fR] [\fB-l\fR] [\fB-L\fR] [\fB-R\fR] [\fB-r\fR [\fIfile\fR]]
[\fB-t\fR \fItag\fR] [\fB-v\fR] [\fB-V\fR] [\fB-x\fR] [\fB-w\fR\fIn\fR] [\fB-C\fR]
[+\fIcommand\fR | \fB-c\fR \fIcommand\fR] \fIfile\fR...
.fi
.SH DESCRIPTION
.sp
.LP
The \fBex\fR utility is the root of a family of editors: \fBex\fR and \fBvi\fR. \fBex\fR is a superset of \fBed\fR(1), with the most notable extension being a display editing facility. Display based editing is the focus of \fBvi\fR.
.sp
.LP
If you have a \fBCRT\fR terminal, you can wish to use a display based editor; in this case see \fBvi\fR(1), which is a command which focuses on the display-editing portion of \fBex\fR.
.sp
.LP
If you have used \fBed\fR you find that, in addition to having all of the \fBed\fR commands available, \fBex\fR has a number of additional features useful on \fBCRT\fR terminals. Intelligent terminals and high speed terminals are very pleasant to use with \fBvi\fR. Generally, the \fBex\fR editor uses far more of the capabilities of terminals than \fBed\fR does, and uses the terminal capability data base (see \fBterminfo\fR(4)) and the type of the terminal you are using from the environment variable \fBTERM\fR to determine how to drive your terminal efficiently. The editor makes use of features such as insert and delete character and line in its \fBvisual\fR command (which can be abbreviated \fBvi\fR) and which is the central mode of editing when using the \fBvi\fR command.
.sp
.LP
The \fBex\fR utility contains a number of features for easily viewing the text of the file. The \fBz\fR command gives easy access to windows of text. Typing \fB^D\fR (CTRL-D) causes the editor to scroll a half-window of text and is more useful for quickly stepping through a file than just typing return. Of course, the screen-oriented \fBvisual\fR mode gives constant access to editing context.
.sp
.LP
The \fBex\fR utility gives you help when you make mistakes. The \fBundo\fR (\fBu\fR) command allows you to reverse any single change which goes astray. \fBex\fR gives you a lot of feedback, normally printing changed lines, and indicates when more than a few lines are affected by a command so that it is easy to detect when a command has affected more lines than it should have.
.sp
.LP
The editor also normally prevents overwriting existing files, unless you edited them, so that you do not accidentally overwrite a file other than the one you are editing. If the system (or editor) crashes, or you accidentally hang up the telephone, you can use the editor \fBrecover\fR command (or \fB-r\fR\fI file\fR option) to retrieve your work. This gets you back to within a few lines of where you left off.
.sp
.LP
The \fBex\fR utility has several features for dealing with more than one file at a time. You can give it a list of files on the command line and use the \fBnext\fR (\fBn\fR) command to deal with each in turn. The \fBnext\fR command can also be given a list of file names, or a pattern as used by the shell to specify a new set of files to be dealt with. In general, file names in the editor can be formed with full shell metasyntax. The metacharacter `%' is also available in forming file names and is replaced by the name of the current file.
.sp
.LP
The editor has a group of buffers whose names are the ASCII lower-case letters (\fBa\fR-\fBz\fR). You can place text in these named buffers where it is available to be inserted elsewhere in the file. The contents of these buffers remain available when you begin editing a new file using the \fBedit\fR (\fBe\fR) command.
.sp
.LP
There is a command \fB&\fR in \fBex\fR which repeats the last \fBsubstitute\fR command. In addition, there is a confirmed substitute command. You give a range of substitutions to be done and the editor interactively asks whether each substitution is desired.
.sp
.LP
It is possible to ignore the case of letters in searches and substitutions. \fBex\fR also allows regular expressions which match words to be constructed. This is convenient, for example, in searching for the word ``edit'' if your document also contains the word ``editor.''
.sp
.LP
\fBex\fR has a set of options which you can set to tailor it to your liking. One option which is very useful is the \fBautoindent\fR option that allows the editor to supply leading white space to align text automatically. You can then use \fB^D\fR as a backtab and space or tab to move forward to align new code easily.
.sp
.LP
Miscellaneous useful features include an intelligent \fBjoin\fR (\fBj\fR) command that supplies white space between joined lines automatically, commands \fB<\fR and \fB>\fR which shift groups of lines, and the ability to filter portions of the buffer through commands such as \fBsort\fR.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.mk
.na
\fB\fB\(mi\fR | \fB-s\fR\fR
.ad
.RS 25n
.rt
Suppresses all interactive user feedback. This is useful when processing editor scripts.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-l\fR\fR
.ad
.RS 25n
.rt
Sets up for editing \fBLISP\fR programs.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-L\fR\fR
.ad
.RS 25n
.rt
Lists the name of all files saved as the result of an editor or system crash.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-R\fR\fR
.ad
.RS 25n
.rt
\fBReadonly\fR mode. The \fBreadonly\fR flag is set, preventing accidental overwriting of the file.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-r\fR \fIfile\fR\fR
.ad
.RS 25n
.rt
Edits \fIfile\fR after an editor or system crash. (Recovers the version of \fIfile\fR that was in the buffer when the crash occurred.)
.RE
.sp
.ne 2
.mk
.na
\fB\fB-t\fR \fItag\fR\fR
.ad
.RS 25n
.rt
Edits the file containing the \fItag\fR and positions the editor at its definition. It is an error to specify more than one \fB-t\fR option.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-v\fR\fR
.ad
.RS 25n
.rt
Starts up in display editing state, using \fBvi\fR. You can achieve the same effect by typing the \fBvi\fR command itself.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-V\fR\fR
.ad
.RS 25n
.rt
Verbose. When \fBex\fR commands are read by means of standard input, the input is echoed to standard error. This can be useful when processing \fBex\fR commands within shell scripts.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-x\fR\fR
.ad
.RS 25n
.rt
Encryption option. Simulates the \fBX\fR command and prompts the user for a key. This key is used to encrypt and decrypt text using the algorithm of the \fBcrypt\fR command. The \fBX\fR command makes an educated guess to determine whether text read in is encrypted or not. The temporary buffer file is encrypted also, using a transformed version of the key typed in for the \fB-x\fR option.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-w\fR\fIn\fR\fR
.ad
.RS 25n
.rt
Sets the default window size to \fIn\fR. This is useful when using the editor over a slow speed line.
.RE
.sp
.ne 2
.mk
.na
\fB\fB-C\fR\fR
.ad
.RS 25n
.rt
Encryption option. Same as the \fB-x\fR option, except that \fB-C\fR simulates the \fBC\fR command. The \fBC\fR command is like the \fBX\fR command, except that all text read in is assumed to have been encrypted.
.RE
.sp
.ne 2
.mk
.na
\fB\fB+\fR\fIcommand\fR | \fB-c\fR\fI command\fR\fR
.ad
.RS 25n
.rt
Begins editing by executing the specified editor \fIcommand\fR (usually a search or positioning command).
.RE
.sp
.ne 2
.mk
.na
\fB\fB/usr/xpg4/bin/ex\fR, \fB/usr/xpg6/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
If both the \fB-t\fR\fI tag\fR and the \fB-c\fR\fI command\fR options are given, the \fB-t\fR\fI tag\fR is processed first. That is, the file containing the tag is selected by \fB-t\fR and then the command is executed.
.RE
.SH OPERANDS
.sp
.LP
The following operand is supported:
.sp
.ne 2
.mk
.na
\fB\fIfile\fR\fR
.ad
.RS 8n
.rt
A path name of a file to be edited.
.RE
.SH USAGE
.sp
.LP
This section defines the \fBex\fR states, commands, initializing options, and scanning pattern formations.
.SS "ex States"
.sp
.ne 2
.mk
.na
\fBCommand\fR
.ad
.RS 11n
.rt
Normal and initial state. Input prompted for by "\fB:\fR". The line kill character cancels a partial command.
.RE
.sp
.ne 2
.mk
.na
\fBInsert\fR
.ad
.RS 11n
.rt
Entered by \fBa\fR, \fBi\fR, or \fBc\fR. Arbitrary text can be entered. Insert state normally is terminated by a line having only "\fB\&.\fR" on it, or, abnormally, with an interrupt.
.RE
.sp
.ne 2
.mk
.na
\fBVisual\fR
.ad
.RS 11n
.rt
Entered by typing \fBvi\fR. Terminated by typing \fBQ\fR or ^\e (Control-\e).
.RE
.SS "ex Command Names and Abbreviations"
.sp
.in +2
.nf
Command Abbrevi- Command Abbrevi- Command Abbrevi-
Name ation Name ation Name ation
abbrev ab map set se
append a mark ma shell sh
args ar move m source so
change c next n substitute s
copy co number nu unabbrev unab
delete d preserve pre undo u
edit e print p unmap unm
file f put pu version ve
global g quit q visual vi
insert i read r write
w
join j recover rec xit x
list l rewind rew yank ya
.fi
.in -2
.sp
.SS "Join Command Arguments"
.sp
.in +2
.nf
Join [\fIrange\fR] j[\fIoin\fR][!] [\fIcount\fR] [\fIflags\fR]
.fi
.in -2
.sp
.sp
.LP
If count is specified:
.sp
.ne 2
.mk
.na
\fB\fB/usr/bin/ex\fR, \fB/usr/xpg6/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
If no address is specified, the\fB join\fR command behaves as if \fI2addr\fR were the current line and the current line plus \fIcount\fR (\fB\&.,. +\fR\fI count\fR). If one address is specified, the \fBjoin\fR command behaves as if \fI2addr\fR were the specified address and the specified address plus \fIcount\fR ( \fIaddr\fR\fB,\fR \fIaddr\fR \fB+\fR \fIcount\fR).
.RE
.sp
.ne 2
.mk
.na
\fB\fB/usr/xpg4/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
If no address is specified, the \fBjoin\fR command behaves as if \fI2addr \fRwere the current line and the current line plus \fIcount \fR\fB-1\fR (\fB\&.,. +\fR \fIcount\fR \fB-1\fR). If one address is specified, the \fBjoin\fR command behaves as if \fI2addr\fR were the specified address and the specified address plus \fIcount\fR \fB-1\fR ( \fIaddr\fR\fB,\fR \fIaddr\fR \fB+\fR \fIcount\fR \fB-1\fR).
.RE
.sp
.ne 2
.mk
.na
\fB\fB/usr/bin/ex\fR, \fB/usr/xpg4/bin/ex\fR, \fB/usr/xpg6/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
If two or more addresses are specified, the \fBjoin\fR command behaves as if an additional address, equal to the last address plus \fIcount\fR \fB-1\fR (\fIaddr1\fR\fB, ...,\fR \fIlastaddr\fR\fB,\fR \fIlastaddr\fR + \fIcount\fR \fB-1\fR), was specified. If this results in a second address greater than the last line of the edit buffer, it is corrected to be equal to the last line of the edit buffer.
.RE
.sp
.LP
If no count is specified:
.sp
.ne 2
.mk
.na
\fB\fB/usr/bin/ex\fR, \fB/usr/xpg4/bin/ex\fR, \fB/usr/xpg6/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
If no address is specified, the \fBjoin\fR command behaves as if \fI2addr\fR were the current line and the next line (\fB\&.,. +1\fR). If one address is specified, the \fBjoin\fR command behaves as if \fI2addr\fR were the specified address and the next line ( \fIaddr\fR\fB,\fR \fIaddr\fR \fB+1\fR).
.RE
.SS "Additional ex Command Arguments"
.sp
.ne 2
.mk
.na
\fB\fB/usr/bin/ex\fR, \fB/usr/xpg6/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
For the following \fBex\fR commands, if \fIcount\fR is specified, it is equivalent to specifying an additional address to the command. The additional address is equal to the last address specified to the command (either explicitly or by default) plus \fIcount\fR\fB-1\fR. If this results in an address greater than the last line of the edit buffer, it is corrected to equal the last line of the edit buffer.
.RE
.sp
.ne 2
.mk
.na
\fB\fB/usr/xpg4/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
For the following \fBex\fR commands, if both a count and a range are specified for a command that uses them, the number of lines affected is taken from the count value rather than the range. The starting line for the command is taken to be the first line addressed by the range.
.RE
.sp
.sp
.TS
tab();
lw(1.38i) lw(4.13i)
lw(1.38i) lw(4.13i)
.
Abbreviateab[brev] word rhs
Append[line]a[ppend][!]
Argumentsar[gs]
Change[range] c[hange][!] [count]
Change DirectoryT{
chd[ir][!] [directory]; cd[!] [directory]
T}
CopyT{
[range] co[py] line [flags]; [range] t line [flags]
T}
DeleteT{
[range] d[elete] [buffer] [count] [flags]
T}
EditT{
e[dit][!] [+line][file]; ex[!] [+line] [file]
T}
Filef[ile] [file]
GlobalT{
[range] g[lobal] /pattern/ [commands]; [range] v /pattern/ [commands]
T}
Insert[line] i[nsert][!]
List[range] l[ist] [count] [flags]
Mapmap[!] [x rhs]
Mark[line] ma[rk] x; [line] k x
Move[range] m[ove] line
Nextn[ext][!] [file ...]
Open[line] o[pen] /pattern/ [flags]
Preservepre[serve]
Put[line] pu[t] [buffer]
Quitq[uit][!]
Read[line] r[ead][!] [file]
Recoverrec[over] file
Rewindrew[ind][!]
SetT{
se[t] [option[=[value]]...] [nooption...] [option?...] [all]
T}
Shellsh[ell]
Sourceso[urce] file
Suspendsu[spend][!]; st[op][!]
Tagta[g][!] tagstring
Unabbreviateuna[bbrev] word
Undou[ndo]
Unmapunm[ap][!] x
Visual[line] v[isual] [type] [count] [flags]
WriteT{
[range] w[rite][!] [>>] [file]; [range] w[rite][!] [file]; [range] wq[!] [>>] [file]
T}
Write and Exit[range] x[it][!] [file]
Yank[range] ya[nk] [buffer] [count]
Adjust Window[line] z [type] [count] [flags]
Escape! command [range]! command
ScrollEOF
Write Line Number[line] = [flags]
Execute@ buffer; * buffer
.TE
.sp
.ne 2
.mk
.na
\fB\fB/usr/bin/ex\fR, \fB/usr/xpg4/bin/ex\fR, \fB/usr/xpg6/bin/ex\fR\fR
.ad
.sp .6
.RS 4n
For the following \fBex\fR commands, if \fIcount\fR is specified, it is equivalent to specifying an additional address to the command. The additional address is equal to the last address specified to the command (either explicitly or by default) plus \fIcount\fR\fB-1\fR. If this results in an address greater than the last line of the edit buffer, it is corrected to equal the last line of the edit buffer.
.RE
.sp
.sp
.TS
tab();
lw(1.38i) lw(4.13i)
lw(1.38i) lw(4.13i)
.
NumberT{
[range] nu[mber] [count] [flags]; [range] | # [count] [flags]
T}
Print[range] p[rint] [count] [flags]
SubstituteT{
[range] s[ubstitute] [/pattern/repl/[options] [count] [flags]]
T}
Shift Left[range] < [count] [flags]
Shift Right[range] > [count] [flags]
ResubstituteT{
[range] & [options] [count] [flags]; [range] s[ubstitute] [options] [count] [flags]; [range] ~ [options] [count [flags]
T}
.TE
.SS "ex Commands"
.sp
.sp
.TS
tab();
lw(1.1i) lw(4.4i)
lw(1.1i) lw(4.4i)
.
\fBC\fRforced encryption
\fBX\fRheuristic encryption
\fB&\fRresubst
\fBCR\fRprint next
\fB>\fRrshift
\fB<\fRlshift
\fB^D\fRscroll
\fBz\fRwindow
\fB!\fRshell escape
.TE
.SS "ex Command Addresses"
.sp
.sp
.TS
tab();
lw(1.1i) lw(4.4i)
lw(1.1i) lw(4.4i)
.
\fIn\fRline \fIn\fR
\fB\&.\fRcurrent
\fB$\fRlast
\fB+\fRnext
\fB-\fRprevious
\fB+\fR\fIn\fR\fIn\fR forward
\fB%\fR1,$
\fB/\fR\fIpat\fRnext with \fIpat\fR
\fB?\fR\fIpat\fRprevious with \fIpat\fR
\fIx\fR\fB-\fR\fIn\fR\fIn\fR before \fIx\fR
\fIx\fR\fB,\fR\fIy\fR\fIx\fR through \fIy\fR
\fB\&'\fR\fIx\fRmarked with \fIx\fR
\fB"\fRprevious context
.TE
.SS "Initializing Options"
.sp
.sp
.TS
tab();
lw(1.38i) lw(4.13i)
lw(1.38i) lw(4.13i)
.
\fBEXINIT\fRplace \fBset\fR's here in environment variable
\fB$HOME/.exrc\fReditor initialization file
\fB\&./.exrc\fReditor initialization file
\fBset\fR \fIx\fRenable option \fIx\fR
\fBset\fR \fBno\fR\fIx\fRdisable option \fIx\fR
\fBset\fR \fIx\fR=\fIval\fRgive value \fIval\fR to option \fIx\fR
\fBset\fRshow changed options
\fBset\fR \fBall\fRshow all options
\fBset\fR \fIx\fR\fB?\fRshow value of option \fIx\fR
.TE
.SS "Useful Options and Abbreviations"
.sp
.sp
.TS
tab();
lw(.92i) lw(.92i) lw(3.67i)
lw(.92i) lw(.92i) lw(3.67i)
.
autoindent\fBai\fRsupply indent
autowrite\fBaw\fRwrite before changing files
directoryT{
pathname of directory for temporary work files
T}
exrc\fBex\fRT{
allow \fBvi\fR/\fBex\fR to read the \fB\&.exrc\fR in the current directory. This option is set in the \fBEXINIT\fR shell variable or in the \fB\&.exrc\fR file in the \fB$\fR\fBHOME\fRdirectory.
T}
ignorecase\fBic\fRignore case of letters in scanning
listprint \fB^I\fR for tab, $ at end
magictreat \fB\&. [ *\fR special in patterns
modelinesT{
first five lines and last five lines executed as \fBvi\fR/\fBex\fR commands if they are of the form \fBex:\fR\fBcommand\fR\fB:\fR or \fBvi:\fR\fBcommand\fR\fB:\fR
T}
number\fBnu\fRnumber lines
paragraphs\fBpara\fRmacro names that start paragraphs
redrawsimulate smart terminal
reportT{
informs you if the number of lines modified by the last command is greater than the value of the \fBreport\fR variable
T}
scrollcommand mode lines
sections\fBsect\fRmacro names that start sections
shiftwidth\fBsw\fRfor \fB< >\fR, and input \fB^D\fR
showmatch\fBsm\fRto \fB)\fR and \fB}\fR as typed
showmode\fBsmd\fRshow insert mode in \fB vi\fR
slowopen\fBslow\fRstop updates during insert
termT{
specifies to \fBvi\fR the type of terminal being used (the default is the value of the environment variable \fBTERM\fR)
T}