Commit Graph

366 Commits

Author SHA1 Message Date
adam
49151c9e61 let the "exit" command return status when it is implicit 1996-09-08 03:12:22 +00:00
peter
be08e0eb02 eek, how did that happen? I must have committed something left over from
when I was experimenting looking for an alternate format.  *blush*
1996-09-03 14:24:44 +00:00
peter
3d3bb118e8 Fix for PR#1287. This makes sh behave sensibly in case statements in the
face of aliases.  Note, bash doesn't do aliases while running scripts, but
"real" ksh does..

Also:
  Reduce redundant .Nm macros in (unused) bltin/echo.1
  nuke error2, it's hardly used.
  More -Wall cleanups
  dont do certain history operations if NO_HISTORY defined
  handle quad_t's from resource limits

Submitted by: Steve Price <sprice@hiwaay.net>  (minor tweaks by me)
1996-09-03 14:16:06 +00:00
peter
4698317f56 Misc cleanups and fixes from Bruce:
- don't put \n on error() calls, error adds it already.
 - don't prepend "ulimit" on error() calls in miscbltin.c.
 - getopt typo on ulimit -p -> -u conversion
 - get/setrlimit() calls were not being error checked

ulimit formatting cleanup from me, use same wording as bash on Bruce's
suggestion.  Add ulimit arg to output on Joerg's suggestion.
1996-09-03 13:35:11 +00:00
peter
cf52863d71 oops, I didn't mean for the unconditional DEBUG code to go in, it's been
off in FreeBSD for some time.  I realised this a few seconds after the
commit started..
1996-09-01 10:27:49 +00:00
peter
db1e9c387e Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a
merge of parallel duplicate work by Steve Price and myself. :-]

There are some changes to the build that are my fault...  mkinit.c was
trying (poorly) to duplicate some of the work that make(1) is designed to
do.  The Makefile hackery is my fault too, the depend list was incomplete
because of some explicit OBJS+= entries, so mkdep wasn't picking up their
source file #includes.

This closes a pile of /bin/sh PR's, but not all of them..

Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
1996-09-01 10:22:36 +00:00
wosch
d4a1c1cff8 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
adam
f62400e2ee set error status on exit, to be consistent with manpage and standard commands. 1996-08-27 21:51:48 +00:00
wosch
e99625b29c sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
wosch
49b42d2ad0 [HISTORY]
cat command appeared in Version 1 AT&T UNIX, not Version 6
	Apparently the cat man page was the first written man page

	Obtained from: A Quarter Century of UNIX, Peter H. Salus
[BUGS]
	fix a typo
1996-08-22 16:54:12 +00:00
ache
545ed1a8d9 Take out 0201-0207 range - those characters abused by sh 1996-08-12 22:14:50 +00:00
ache
14436b9fc7 Convert to newly added collate compare function 1996-08-12 21:32:15 +00:00
ache
7c73661dad Convert to newly added collate compare function 1996-08-12 19:31:11 +00:00
ache
907d8c43f6 Simplify expression 1996-08-12 12:31:28 +00:00
ache
14738091c0 Use collate for alpha character ranges 1996-08-12 02:08:43 +00:00
ache
9f8c58b3e3 Fix unsetenv of locale variable 1996-08-11 23:10:38 +00:00
ache
7792694e18 Localize it 1996-08-11 22:51:00 +00:00
ache
3020663efc Pick collate info for RE character ranges 1996-08-11 16:59:27 +00:00
ache
9257d220bd Localize it
8bit cleanup
1996-08-11 16:48:11 +00:00
adam
2837ce3d40 chmod(2) directories once only (was twice) 1996-08-10 15:05:26 +00:00
dg
78821ab874 Updated to match kernel changes for timer/run queue. 1996-07-31 09:27:23 +00:00
wosch
731cb1dfec add a reference to killall(1) 1996-07-03 22:19:50 +00:00
mpp
c336415f2a The default swap device is /dev/drum, not /dev/swap
as ps.1 states.

Submitted by:	Zahemszhky Gabor <zgabor@code.hu>
1996-07-03 22:17:28 +00:00
mpp
4a0cc4e3f1 Fix some minor formatting problems in some examples.
Obtained from:  Partially obtained from NetBSD-bugs mailing list
1996-07-03 01:28:34 +00:00
peter
94fb710c77 Make %CPU add up closer to 100%.. At least, it now agrees with top.. :-)
Pointed out by: bde
1996-06-29 10:25:31 +00:00
peter
8facdff20e Fix (I think) the %MEM count in 'ps -u'. It was bogusly taking the
vm_rssize (in pages, not bytes), then dividing (bogusly) by the page size,
then using that as a fraction of the total pages.
1996-06-29 08:04:05 +00:00
jkh
e693c16dd8 Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src.  This is the final version of the
patches, incorporating the feedback I've received from -current.
1996-06-24 04:26:21 +00:00
wosch
69fdab67e4 Add a better TEST script. I was surprised how much can be wrong
with program test(1) or builtin test(1).
1996-06-19 00:44:44 +00:00
phk
166aa207ac Backup yacc changes. 1996-06-02 17:06:40 +00:00
phk
c2282491a3 Backout yacc changes 1996-06-02 17:05:48 +00:00
phk
39936ba9bb Use new yacc rules. (I'm fixing the tree as fast as I can :-) 1996-05-30 20:52:26 +00:00
phk
914a0cafaf Use default yacc rule. 1996-05-30 20:44:09 +00:00
peter
ba3e035290 This commit was generated by cvs2svn to compensate for changes in r15920,
which included commits to RCS files with non-trunk default branches.
1996-05-27 01:41:12 +00:00
peter
28012a479c Import the 4.4BSD-Lite2 /bin/sh sources
Requested by: joerg

(Note, this is mostly going to be conflicts, which is expected.  Our entire
 sh source has a mainline, so this should not change anything except for
 a few new files appearing.  I dont think they are a problem)
1996-05-27 01:41:12 +00:00
peter
1257227edf Nuke the undocumented -F flag, since it doesn't do anything anymore.
It used to allow root to hard-link directories (and screw up programs that
expexted the ".." entry to point to the parent dir)
1996-05-24 20:36:16 +00:00
tg
83c817dbd7 Output line count to stdout. Complies to POSIX.2.
Reviewed by:	joerg
1996-05-23 06:36:34 +00:00
wosch
5c15c67589 `mv'' -> `mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
1996-05-07 23:19:49 +00:00
phk
e2bbf084a5 CLSIZE -> getpagesize() 1996-05-02 13:06:21 +00:00
phk
201f1269c8 Replace NBPG with getpagesize() 1996-05-02 08:37:16 +00:00
smpatel
20e67baee3 Fix up the badly out of date struct proc's p_flags.
Flags aren't printed in hexadecimal, as documented.
1996-04-19 22:23:27 +00:00
mpp
e6d2f2986f Correct some cross references and some path names. 1996-04-06 09:47:30 +00:00
ache
1aba75c7ca For nonexisten time use proper diagnostic instead of bad format and usage 1996-04-06 01:42:09 +00:00
ache
5fd41d593f Use unsigned char for isprint 1996-03-31 16:14:11 +00:00
bde
414c8f4b91 Fixed typo.
Reported by:	andreas@knobel.gun.de
1996-03-31 02:29:13 +00:00
nate
440eb4df65 Fix 'stutter' in manpage.
The man page for date(1) talks about "a a" maximum, not just
    "a" maximum.

Submitted by:	Simon Burge <simonb@telstra.com.au> via NetBSD GNATS
1996-03-12 05:30:39 +00:00
joerg
693dd454a4 err() --> errx() for non-errno related failures. 1996-03-11 11:01:03 +00:00
wosch
c9b4fb2252 Option -f implemented (remove + create)
option -f and -i are exclusive
respond `Y' is equal to `y'
fix usage string
remove isatty(3) check

Reviewed by:	pst
1996-03-08 06:58:08 +00:00
wosch
fbfd06b398 fix usage string
respond `Y' is equal to `y'

Add a note how to delete file name with beginning `-'
1996-03-07 23:26:59 +00:00
wosch
a17e60b561 delete unused label endarg
correct indent of last new code
fix usage string, option -f before option -i (alphabetic order)
1996-03-01 06:14:13 +00:00
wosch
a4158c0ec5 option -f and -i are exclusive (Posix)
respond `Y' is equal to `y'
update usage string
prompt only if source exist
1996-02-20 23:27:57 +00:00
pst
149ff31550 Don't initialize udata, fix usage string 1996-02-19 05:57:22 +00:00
pst
47e06c1e28 Don't initialize udata, remove bogus case, fix usage string 1996-02-19 05:56:34 +00:00
pst
ba5d3491e4 -- is implemented in getopt(3)
-? is an unnecessary case statement and not useful
1996-02-19 05:51:13 +00:00
wosch
2a9518f55e delete my last commit
Submitted by:	pst, ache
1996-02-19 00:44:19 +00:00
pst
0b55bfa8d9 Remove unnecessary '?' case and don't zero global udata, it's already zero 1996-02-18 19:54:04 +00:00
wosch
969d6e965c update usage string
all flag variables initialized with zero
respond `Y' is equal to `y'
1996-02-18 19:00:59 +00:00
wosch
a027b5fde4 Option -f implemented (remove + create)
option -f and -i are exclusive
all flag variables initialized with zero
respond `Y' is equal to `y'
update usage string
1996-02-18 18:48:26 +00:00
wosch
1b1def816a option -f and -i are exclusive
all flag variables initialized with zero
respond `Y' is equal to `y'
update usage string
prompt only if source exist

ignore -i option if file descriptor stdin not refers to a valid
terminal type device
1996-02-18 18:44:58 +00:00
joerg
d4cf537a64 Add an .Xr for chflags(1) into the SEE ALSO sectoin.
Submitted by:	jhs
1996-02-16 00:08:53 +00:00
mpp
ff87a22e97 Added a update(4) man page to describe the kernel initiated update
process and changed all of the old references to update(8) to update(4).
1996-02-12 00:45:47 +00:00
mpp
bda6e1c756 Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
markm
1bc7ca8305 #include <kerberosIV/des.h> -> #include <des.h> 1996-02-11 09:18:18 +00:00
pst
7eff8f18b2 Close bin/937 - handle negative timestamps 1996-02-08 21:06:40 +00:00
joerg
36d37235bb Fix the borokeness that crept in with rev 1.10 of parser.c, the sh
didn't correctly start background jobs anymore.  Strange that nobody
was complaining...

Add a dummy target for `builtins' in the Makefile, to prevent it
from attempting to build this file by compiling builtins.c. :-/
1996-02-03 13:27:55 +00:00
mpp
98bcf4c755 Fix some incorrect locations in the FILES sections of some man pages. 1996-02-02 18:22:04 +00:00
mpp
832c3759d7 Fix some spelling errors. 1996-01-29 22:53:24 +00:00
mpp
049661b89b Use the correct buffer size from limits.h for the error buffer
passed to kvm_open.  Closes PR# 476.

Submitted by:	Jeffrey Hsu <hsu@freebsd.org>
1996-01-20 10:43:54 +00:00
mpp
1c930965a4 Remove unused include of utmp.h from print.c. Closes PR# 486.
Submitted by:	Tom Samplonius <tom@haven.uniserve.com>
1996-01-20 10:31:14 +00:00
bde
09b2ad8f57 Partially fixed negative and truncated "Avail" counts in df output.
This fixes PR943.

ffs/ffs_vfsops.c:
ffs_statfs() multiplied by (100 - minfree) as part of calculating the
minfree percentage (complemented in 100%), so with the standard minfree
of 8, it was broken for file systems of size >= 1TB/92 = 11GB.  Use the
standard freespace() macro instead.  This also fixes a rounding bug (the
"Avail" count was sometimes 1 too small).

ffs/* (not fixed):
The freespace() macro multiplies by minfree, so with the standard
minfree of 8, it is broken for file systems of size >= 1TB/8 = 128GB.
This bug is more serious since it affects block allocation.

ffs/ffs_alloc.c (not fixed):
Ordinary users are sometimes allowed to allocate 1 (partial) block
too many so that the "Avail" count goes negative.  E.g., if there is
1 fragment available and the file is fairly large, one more full
block is allocated.

df/df.c:
ufs_df() used/uses essentially the same code as ffs_statfs(), so it
had/has the same bugs.

ufs_df() gratuitously replaced "Avail" counts of < 0 by 0, so it
gave different results for non-mounted file systems in this case.
1996-01-14 18:55:09 +00:00
peter
d7b348d79e oops. I forgot to add the "[-U username]" option to the usage string. 1996-01-12 08:49:43 +00:00
peter
6470cdf2a0 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
joerg
65600dbbe6 Print dev minor #'s > 255 in hex.
Reviewed by:	jkh, kuku, phk
1995-12-30 18:15:30 +00:00
joerg
b47c269c8d Small man page tweaks:
. mention the need for procfs
. make it clear that default sorting is first by ctty, then by PID

Submitted by: schweikh@ito.uni-stuttgart.de (Jens Schweikhardt)
1995-12-30 13:52:02 +00:00
peter
9b80d26c22 Implement a new option to ps.. `-U username'. This allows you to
list the processes belonging to a particular user without having to use
`-u' and grepping for the username.  Basically you can now get a short
`ps -x' like list (with more space for the command) for other users.
1995-12-26 03:38:55 +00:00
bde
64aab4356c Restored formatting from the old printf/printf.c. 1995-12-14 23:19:36 +00:00
joerg
2dd6ac9b28 The shell incorrectly gave & precedence over ;. This breaks the
traditional behaviour, and it violates Posix.2.

Fixes PR # bin/880: /bin/sh incorrectly parse...

Fixes also an earlier problem report about the shell not evaluating
loops correctly.  (Not files via GNATS.)

Submitted by:	nnd@itfs.nsk.su (Nickolay N. Dudorov)
1995-12-10 17:59:23 +00:00
joerg
402a79f826 Move out some of the shell builtin bogosity from printf's source to
sh's builtin/bltin.h.
1995-12-10 15:40:42 +00:00
joerg
80972db9d7 Fix my own brokeness for the colon operator, when one of the arguments
was a valid integer.  The actual decision between integer and string
is now context-dependant on the operator being used.
1995-11-18 18:05:03 +00:00
peter
0017db9c16 A fix for the "cd -" coredump on a brand new /bin/sh. The problem was
noticed on a NetBSD bugs mailing list but this is entirely my own work.

Inspired by: Scott Reynolds <scottr@plexus.com>, for NetBSD
1995-11-14 01:04:52 +00:00
bde
8405e72006 Fixed descriptions of ignpar and parmrk. 1995-11-11 03:31:13 +00:00
peter
bce518cbd3 Implement allowing 'set -v' in the middle of a script to work.
This means that a script containing:
  echo 1
  set -v
  echo 2
will now produce output, like it does on SYSV machines and other 'proper'
/bin/sh implementations..

This is done by a slight restructure of the input processor allowing it to
read chunks from the file at a time, but process the data by line from the
chunk.

Obtained from:  Christos Zoulas for NetBSD. <christos@deshaw.com>
1995-11-03 18:50:14 +00:00
phk
1acffefabf I add #include <sys/user.h> 1995-10-28 20:11:18 +00:00
ache
b7d0978d02 Fix -h option:
sense symlink even it is unresolved
1995-10-28 11:54:42 +00:00
ache
1ffe3ce1a3 Change local to LC_ALL, there is no bitmask 1995-10-26 10:57:52 +00:00
ache
4ce0ca17af Change locale to LC_ALL, there no bitmask 1995-10-26 10:56:38 +00:00
torstenb
e9d3587ad5 fix bad dependencies (LIBMATH -> LIBM) 1995-10-25 15:08:21 +00:00
ache
2fd134db5b Add missing reaction on LC_ALL and LC_COLLATE 1995-10-23 23:08:26 +00:00
ache
3424b01c58 Add setlocale LC_CTYPE 1995-10-23 21:31:48 +00:00
ache
155f394f94 Remove unneded ctype.h everywhere
Add setlocale LC_TIME
1995-10-23 21:23:27 +00:00
ache
519d86dc6b Change LC_ALL to LC_CTYPE|LC_TIME - small optimization 1995-10-23 21:09:01 +00:00
ache
c525beefdf Add setlocale LC_CTYPE|LC_TIME 1995-10-23 21:06:31 +00:00
ache
44c7c30479 Remove unneded ctype.h 1995-10-23 21:03:40 +00:00
ache
319f1da108 Add setlocale LC_ALL 1995-10-23 20:36:26 +00:00
ache
c1cc65762e Add setlocale(LC_TIME,... 1995-10-23 20:26:53 +00:00
ache
33460f5501 Wrong library was picked by ed 1995-10-22 20:14:13 +00:00
joerg
4e0f66cc79 o rename ulimit -p into ulimit -u, so we are in agreement with bash
o fix brokeness for 1>&5 redirection, where `5' was an invalid file
  descriptor, but no error message has been generated

o fix brokeness for redirect to/from myself case
1995-10-21 00:47:32 +00:00
joerg
e988562d76 Implement the "ulimit" builtin. This is the analogon to csh's "limit"
command and badly needed in sh(1) for everybody who wants to modify
the system-wide limits from inside /etc/rc.

The options are similar to other system's implemantations of this
command, with the FreeBSD additions for -m (memoryuse) and -p (max
processes) that are not available on other systems.
1995-10-19 18:42:12 +00:00
joerg
56e0173839 Fix my breakage of the $0 handling during $ENV processing.
Since the broken version went into 2.1, this fix should, too.
1995-10-09 17:56:32 +00:00
bde
e9c97c811b Handle trailing slashes in source filenames correctly. E.g., rewrite
`mv foo/ ../..' to `mv foo/ ../../foo/', not to `mv foo/ ../../'.  The
latter caused a panic.  Before the trailing slash changes in the kernel,
the trailing slashes caused the rename() for this mv to fail earlier, so
there was no panic in 2.0.

Fixes part of PR 760.
1995-10-07 10:42:48 +00:00
markm
6bdec36c43 Correctly build the secure ed(1) only if secure/ exists.
Pointed out by:	bde
1995-10-03 15:44:50 +00:00
bde
243b088ed2 Preserve sticky bit for cp -pR'. It was already preserved for cp -R'.
This also fixes loss of the sticky bit for `mv' across file systems.
1995-10-03 12:55:01 +00:00
bde
9329cb6b3c Fix exit status. `cat no-such-file >/dev/null' exited with status 0.
This has been broken since cat's own err() function was sloppily
replaced by the library functions warn() and err().
1995-10-03 12:46:37 +00:00
joerg
c80589d3b0 Make the mkinit internal command issue an #undef for each #define, to
avoid "duplicate definition" warnings.
1995-10-01 15:13:31 +00:00
joerg
28020fbce3 Posixize:
sh  -c [-aCefinuvx] command_string [ command_name [argument ...]  ]        1

 4.56.3  Options

    -c          Read commands from the command_string operand.  Set the
                value of special parameter 0 (see 3.5.2) from the value of
                the command_name operand and the positional parameters
                ($1, $2, etc.) in sequence from the remaining argument
                operands.

Pointed out by: Kaleb Keithly (kaleb@x.org)
1995-10-01 15:11:42 +00:00
markm
78f711b914 Define CRYPTOBJDIR if secure is being built 1995-10-01 14:55:06 +00:00
markm
a00c541511 ed/Makefile is able to 'decide' for itself whether to build secure or
unceumbered ed. Remove the superfluous .if (...) / .endif
1995-10-01 14:24:01 +00:00
markm
05683329e7 Use the same make technique as passwd and xntpd for the secure ed(1). This
will allow the secure/bin/ed directory to be cleaned out and the bin/Makefile
to be cleaned up.
1995-10-01 14:17:29 +00:00
ache
e86c819403 Build secure ed if available and allowed 1995-09-29 19:31:55 +00:00
peter
69c296a7e8 Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters.

David Greenman pointed out that when a process that had been revoked from
it's controlling tty, the "-" sign was detached from any two-character
names.
1995-09-26 17:48:59 +00:00
mpp
fa60684197 Uncomment out references to FIFOs for the -F and -l options.
Also mention sockets in the text for -F.

Partially obtained from the NetBSD commit mail list.
1995-09-26 08:48:09 +00:00
bde
639631b078 Fix relocation of job table.
while { sleep 1 & wait; } do echo 1; done

corrupted the job table every 4th iteration.
1995-09-21 13:24:20 +00:00
dg
299dbda765 Don't dereference a NULL pointer in the case of a null pipe.
e.g.:
ls |> foo.out

sh now behaves the same as it does under SunOS 4.x for this case.
1995-09-20 08:30:56 +00:00
pst
17129ca39c If mail is received with no from address, invoke sendmail with
/usr/sbin/sendmail -f <> dest
rather than
	/usr/sbin/sendmail -f dest.

Submitted by:  Michael Butler <imb@scgt.oz.au>
Obtained from: Eric Allman <eric@cs.berkeley.edu>
1995-09-16 18:52:51 +00:00
markm
8a8e624232 Updating /usr/include/kerberosIV/des.h so eBones will build breaks
rcp and rlogin.
(patch supplied)

Submitted by:  John Capo <jc@irbs.com>
1995-09-10 14:59:51 +00:00
peter
bbe961035e Increase the tty column width from 2 to 3 characters.
This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports..  eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.
1995-09-04 01:22:54 +00:00
jkh
bba017cc52 Well, it would appear that the "ayes" have it (though by a slim margin).
Apply my \c changes to echo.  It should also be noted that this is:
A) going into 2.2, not 2.1
B) a functional no-op unless you actually use it!
1995-08-31 17:25:55 +00:00
joerg
1c542fcb27 Sigh. This will become a never ending story. :-(
When comparing my recent parser change against the ash in 1.1.5.1, i
found that a couple of other problems in the same area has been fixed
there, but not in 2.2.  Semicolons and EOF do also delimit words...
1995-08-28 19:24:35 +00:00
dg
bb2bb18746 Correct the default format info to indicate "%+". 1995-08-28 10:38:01 +00:00
joerg
48a19ede59 Make the shell handle a null command in a &&/|| sequence correctly.
The && and || tokens do also terminate a command, not only the
newline.

While i was at it, disabled trace code by default, it served no good
purpose since it required the use of a debugger anyway to be turned
on.  Instead, placed a hint in the Makefile on how to turn it on.

This makes the shell ~ 10 % faster and ~ 4 KB smaller. :)

Pointed out by:  jan@physik.TU-Berlin.DE (Jan Riedinger)
1995-08-27 20:26:44 +00:00
pst
8bfad523d3 Clean up compilation warnings. 1995-08-23 05:31:06 +00:00
nate
c40897ec80 Fix possible FS corruption caused by extra parameter to pax.
oo
Turns out, it's pretty important if you use PAX for backup.  In the man
page for PAX, there is an error (OK, we could call it a "potentially
catastrophic incompleteness").  It reads:

>  The command:
>
>      pax -r -v -f filename
>
>  gives the verbose table of contents for an archive stored in filename.

Yup, it does do that.  With a side effect: it also _replaces_ all the
files that come in from the archive.  As is my custom, I did my
backup-validation real soon after the backup was written.  Precisely
because I've seen the same sort of thing happen on other systems.  So all
that file-restoring didn't do a lot of damage.  Probably helped my
fragmentation somewhat (aha, an online defragger?) It did confuse one
hapless user, who lost an email message he _knew_ he hadn't deleted.
Apparently the system restored the file as of just before that critical
message came in.

The correct entry should read:

>  The command:
>
>      pax -v -f filename
>




>  gives the verbose table of contents for an archive stored in filename.


Submitted by:	John Beckett <jbeckett@southern.edu> via the BSDI mailing list
1995-08-16 23:12:25 +00:00
joerg
7dc559fa65 The command to `move' across file system boundaries is actually
cp -PRp source_file destination

Closes PR # bin/689: mv(1) manpage

Submitted by:	wosch@cs.tu-berlin.de (Wolfram Schneider)
1995-08-15 19:44:39 +00:00
joerg
31f993e53f sh(1) incorrectly ignored an EOF condition when looking for the
closing backquote in a `foo` substitution.

Discovered by: Martin Welk <mw@theatre.pandora.sax.de>
1995-08-11 08:18:39 +00:00
ache
bb4c379962 Fix csh to determine event number properly, i.e. stop by ^*-% too.
This fix match with what manpage said and other systems csh's do.
Submitted by: Bill Fenner <fenner@parc.xerox.com>
1995-08-10 05:13:42 +00:00
ache
d13d63f487 Change ctime to strftime %c to use national date/time representation 1995-08-08 00:03:04 +00:00
wollman
01cdce9796 Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
1995-08-07 19:17:46 +00:00
joerg
756c4a7745 Fix /bin/sh's broken handling of the builtin getopts(1). The options
``-ffoo'' and ``-f foo'' have been treated differently.

This has been in violation of Posix.2 (that deprecates -ffoo, but
doesn't disallow it).
1995-08-06 19:35:33 +00:00
ache
29fc7e80b1 Use %+ to print data using LC_TIME 1995-08-05 23:08:17 +00:00
joerg
025138b8e4 expr(1) didn't comply to Posix.2 and its own man page: any
comparisions have been made as string comparisions, even in cases
where both operands clearly qualified as integers.

The fix is to make the parser properly analyzing whether an operand is
a valid integer or not.
1995-08-04 17:08:07 +00:00
rgrimes
c20c5aa1a5 Set NOSHARED=true, having this binary static makes it much easier to
fix /usr/lib/*.so problems.

Submitted by:	davidg
1995-07-24 01:44:17 +00:00
ache
72cdb14024 Move first PATH initialization after sensing for interactive,
first relative path warning was disabled in old case
1995-07-07 23:14:36 +00:00
ache
130bed104c Do the same check for interactive shell (PATH warning)
like in csh.c
1995-07-07 23:13:11 +00:00
ache
040a72d09a Produce importpath warning only for true interactive shells,
close PR 598
1995-07-07 22:45:26 +00:00
bde
2d44811a6f Improve the recently changed and an old error message: don't report probe
errors.
1995-07-04 08:16:32 +00:00
joerg
57c55a07d4 stty fails with a non-obvious error message if it's run on a non-tty
stream, such as a rsh or vi pipeline.

The error message is:
stty: TIOCGETD: Operation not supported

It's immediately obvious to the knowledgable hacker type, but not
exactly comforting to the user who's not native to unix.  It's
especially confusing if there's a stty command in their .cshrc and
it's showing up on rsh output.

(Fixes PR #bin/573)

Submitted by:	peter@haywire.dialix.com (Peter Wemm)
1995-07-02 08:54:27 +00:00
bde
2f142e92c8 Improve the handling of large minor numbers:
cpio/copyout.c:
Don't output a file if the major, minor or totality of its rdev would be
truncated.  Print a message about the skipped files to stderr but don't
report the error in the exit status.  cpio's abysmal error handling doesn't
allow continuing after an error, and the rdev checks had to be misplaced
to avoid the problem of returning an error code from routines that return
void.

pax/pax.h:
Use the system macros for major(), minor() and makedev().

pax already checks _all_ output conversions for overflow.  This has the
undesirable effect that failure to convert relatively useless fields
such as st_dev for regular files causes files not to be output.  pax
doesn't report exactly which fields couldn't be converted.

tar/create.c:
Don't output a file if the major or minor its rdev would be truncated.
Print a message about the skipped files to stderr and report the error
in the exit status.

tar/tar.c:
For not immediately fatal errors, exit with status 1, not the error count
(mod 256).

All:
Minor numbers are limited to 21 bits in pax's ustar format and to 18
bits in archives created by gnu tar (gnu tar wastes 3 bits for padding).
pax's and cpio's ustar format is incompatible with gnu tar's ustar
format for other reasons (see cpio/README).
1995-06-26 06:24:48 +00:00
ache
b8ae7b54d6 Additionly print strerror(errno), when getwd() fails to start
in initial directory.
Obtained from: idea from NetBSD
1995-06-18 14:34:48 +00:00
ache
17ed5c8332 Fix error:
which /bin/ls
.//bin/ls
Obtained from: NetBSD
1995-06-18 14:20:16 +00:00
ache
3dd76c2236 When filec active, TCSANOW was used in any case instead of
sensing TCSADRAIN/TCSAFLUSH
Obtained from: NetBSD
1995-06-18 14:08:44 +00:00
bde
4a3a78f536 Don't unlink the target file if the copy failed. This behaviour isn't
documented and is incompatible with gnu cp.  It has very few good effects
(it recovers some disk space) and many bad ones:
- special files are unlinked after certain errors.
- the data may not be recoverable if the source is a special file or fifo.
- unlinking destroys the target attributes as well as the target data.
- unlinking doesn't actually remove the target data if the target is multiply
  linked.
1995-06-14 05:41:27 +00:00
rgrimes
79e59e9123 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
rgrimes
e6999472c1 Remove trailing whitespace.
Reviewed by:	phk
1995-05-30 00:07:29 +00:00
ache
80333f1d63 Describe -m option 1995-05-06 13:52:29 +00:00
adam
a2f7d2cc4d typo there --> their 1995-05-05 16:49:15 +00:00
dg
619eb1f366 From "Philippe Charnier" <charnier@lirmm.fr>:
There is a bug in sh: the built in command "fc -l" generates
a core dump (*NULL in not_fcnumber).

According to the sh manual page (fc  -l [-nr] [first [last]]), fc -l
is a correct sequence (in that case, values are defaulted to -16 and -1)
but fails when first is not given.
1995-05-05 06:34:13 +00:00
bde
9d75db1630 Support nonstandard (not yet all supported) flow control options. `ctsflow'
and `rtsflow' are the components of `crtscts'.  `dtrflow' and `dsrflow' are
new and not yet supported.  `dtrflow' may be useful for Cyclades serial
careds, which have h/w support for it and no h/w support for `rtsflow'.

print.c:
Report NTTYDISC in case the line is in this obsolescent state.
1995-04-29 15:17:17 +00:00
bde
a407151d83 Fix stty' on the output of stty -g'. The changes for the gfmt1 option
weren't TIOCSETD'd  unless another option changed something.
1995-04-29 15:00:34 +00:00
ache
bc39c40e2e Fix bugs:
cchars2 not used
can't set or report MIN or TIME == 255
TIOCSETD on wrong fd
PPPDISC is not reported
1995-04-28 19:29:30 +00:00
dg
43d095fa58 Install with default BINOWN (as it once used to be). 1995-04-15 03:31:19 +00:00
dg
920072075e Install setgid kmem rather than setuid root. The problem with procfs that
was breaking this before has been fixed.
1995-04-15 03:25:52 +00:00