aboutsummaryrefslogtreecommitdiff
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Implement the "ulimit" builtin. This is the analogon to csh's "limit"Joerg Wunsch1995-10-193-3/+269
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=11571
* Fix my breakage of the $0 handling during $ENV processing.Joerg Wunsch1995-10-091-2/+2
| | | | | | | Since the broken version went into 2.1, this fix should, too. Notes: svn path=/head/; revision=11377
* Handle trailing slashes in source filenames correctly. E.g., rewriteBruce Evans1995-10-071-5/+11
| | | | | | | | | | | | `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. Notes: svn path=/head/; revision=11298
* Correctly build the secure ed(1) only if secure/ exists.Mark Murray1995-10-031-2/+2
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=11149
* Preserve sticky bit for `cp -pR'. It was already preserved for `cp -R'.Bruce Evans1995-10-031-2/+3
| | | | | | | This also fixes loss of the sticky bit for `mv' across file systems. Notes: svn path=/head/; revision=11146
* Fix exit status. `cat no-such-file >/dev/null' exited with status 0.Bruce Evans1995-10-031-2/+7
| | | | | | | | This has been broken since cat's own err() function was sloppily replaced by the library functions warn() and err(). Notes: svn path=/head/; revision=11145
* Make the mkinit internal command issue an #undef for each #define, toJoerg Wunsch1995-10-011-3/+15
| | | | | | | avoid "duplicate definition" warnings. Notes: svn path=/head/; revision=11113
* Posixize:Joerg Wunsch1995-10-011-1/+4
| | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=11111
* Define CRYPTOBJDIR if secure is being builtMark Murray1995-10-011-0/+10
| | | | Notes: svn path=/head/; revision=11108
* ed/Makefile is able to 'decide' for itself whether to build secure orMark Murray1995-10-011-8/+2
| | | | | | | unceumbered ed. Remove the superfluous .if (...) / .endif Notes: svn path=/head/; revision=11107
* Use the same make technique as passwd and xntpd for the secure ed(1). ThisMark Murray1995-10-011-2/+9
| | | | | | | | will allow the secure/bin/ed directory to be cleaned out and the bin/Makefile to be cleaned up. Notes: svn path=/head/; revision=11106
* Build secure ed if available and allowedAndrey A. Chernov1995-09-291-2/+8
| | | | Notes: svn path=/head/; revision=11065
* Correct the alignment of the tty column, which was affected by my change toPeter Wemm1995-09-262-5/+5
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=11021
* Uncomment out references to FIFOs for the -F and -l options.Mike Pritchard1995-09-261-6/+7
| | | | | | | | | Also mention sockets in the text for -F. Partially obtained from the NetBSD commit mail list. Notes: svn path=/head/; revision=11015
* Fix relocation of job table.Bruce Evans1995-09-211-1/+8
| | | | | | | | | while { sleep 1 & wait; } do echo 1; done corrupted the job table every 4th iteration. Notes: svn path=/head/; revision=10934
* Don't dereference a NULL pointer in the case of a null pipe.David Greenman1995-09-201-2/+3
| | | | | | | | | | e.g.: ls |> foo.out sh now behaves the same as it does under SunOS 4.x for this case. Notes: svn path=/head/; revision=10917
* If mail is received with no from address, invoke sendmail withPaul Traina1995-09-161-1/+3
| | | | | | | | | | | | /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> Notes: svn path=/head/; revision=10824
* Updating /usr/include/kerberosIV/des.h so eBones will build breaksMark Murray1995-09-101-1/+3
| | | | | | | | | | rcp and rlogin. (patch supplied) Submitted by: John Capo <jc@irbs.com> Notes: svn path=/head/; revision=10663
* Increase the tty column width from 2 to 3 characters.Peter Wemm1995-09-042-5/+5
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=10553
* Well, it would appear that the "ayes" have it (though by a slim margin).Jordan K. Hubbard1995-08-312-5/+13
| | | | | | | | | 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! Notes: svn path=/head/; revision=10498
* Sigh. This will become a never ending story. :-(Joerg Wunsch1995-08-281-1/+4
| | | | | | | | | 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... Notes: svn path=/head/; revision=10399
* Correct the default format info to indicate "%+".David Greenman1995-08-281-2/+2
| | | | Notes: svn path=/head/; revision=10364
* Make the shell handle a null command in a &&/|| sequence correctly.Joerg Wunsch1995-08-273-4/+8
| | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=10354
* Clean up compilation warnings.Paul Traina1995-08-231-1/+4
| | | | Notes: svn path=/head/; revision=10181
* Fix possible FS corruption caused by extra parameter to pax.Nate Williams1995-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=10083
* The command to `move' across file system boundaries is actuallyJoerg Wunsch1995-08-151-2/+2
| | | | | | | | | | | cp -PRp source_file destination Closes PR # bin/689: mv(1) manpage Submitted by: wosch@cs.tu-berlin.de (Wolfram Schneider) Notes: svn path=/head/; revision=10068
* sh(1) incorrectly ignored an EOF condition when looking for theJoerg Wunsch1995-08-111-1/+5
| | | | | | | | | closing backquote in a `foo` substitution. Discovered by: Martin Welk <mw@theatre.pandora.sax.de> Notes: svn path=/head/; revision=10025
* Fix csh to determine event number properly, i.e. stop by ^*-% too.Andrey A. Chernov1995-08-101-2/+2
| | | | | | | | This fix match with what manpage said and other systems csh's do. Submitted by: Bill Fenner <fenner@parc.xerox.com> Notes: svn path=/head/; revision=10016
* Change ctime to strftime %c to use national date/time representationAndrey A. Chernov1995-08-081-3/+3
| | | | Notes: svn path=/head/; revision=9991
* Delete bogus referneces to timezone code internal header file `tzfile.h',Garrett Wollman1995-08-073-10/+7
| | | | | | | which is no longer bogusly installed in /usr/include. Notes: svn path=/head/; revision=9987
* Fix /bin/sh's broken handling of the builtin getopts(1). The optionsJoerg Wunsch1995-08-061-3/+2
| | | | | | | | | | ``-ffoo'' and ``-f foo'' have been treated differently. This has been in violation of Posix.2 (that deprecates -ffoo, but doesn't disallow it). Notes: svn path=/head/; revision=9974
* Use %+ to print data using LC_TIMEAndrey A. Chernov1995-08-051-2/+2
| | | | Notes: svn path=/head/; revision=9944
* expr(1) didn't comply to Posix.2 and its own man page: anyJoerg Wunsch1995-08-041-1/+13
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=9909
* Set NOSHARED=true, having this binary static makes it much easier toRodney W. Grimes1995-07-241-0/+2
| | | | | | | | | fix /usr/lib/*.so problems. Submitted by: davidg Notes: svn path=/head/; revision=9673
* Move first PATH initialization after sensing for interactive,Andrey A. Chernov1995-07-071-10/+12
| | | | | | | first relative path warning was disabled in old case Notes: svn path=/head/; revision=9434
* Do the same check for interactive shell (PATH warning)Andrey A. Chernov1995-07-071-2/+3
| | | | | | | like in csh.c Notes: svn path=/head/; revision=9433
* Produce importpath warning only for true interactive shells,Andrey A. Chernov1995-07-071-2/+3
| | | | | | | close PR 598 Notes: svn path=/head/; revision=9432
* Improve the recently changed and an old error message: don't report probeBruce Evans1995-07-042-7/+5
| | | | | | | errors. Notes: svn path=/head/; revision=9393
* stty fails with a non-obvious error message if it's run on a non-ttyJoerg Wunsch1995-07-021-3/+5
| | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=9384
* Improve the handling of large minor numbers:Bruce Evans1995-06-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=9322
* Additionly print strerror(errno), when getwd() fails to startAndrey A. Chernov1995-06-181-2/+2
| | | | | | | | in initial directory. Obtained from: idea from NetBSD Notes: svn path=/head/; revision=9259
* Fix error:Andrey A. Chernov1995-06-181-5/+12
| | | | | | | | | which /bin/ls .//bin/ls Obtained from: NetBSD Notes: svn path=/head/; revision=9258
* When filec active, TCSANOW was used in any case instead ofAndrey A. Chernov1995-06-181-5/+5
| | | | | | | | sensing TCSADRAIN/TCSAFLUSH Obtained from: NetBSD Notes: svn path=/head/; revision=9257
* Don't unlink the target file if the copy failed. This behaviour isn'tBruce Evans1995-06-141-8/+7
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=9220
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8874
* Remove trailing whitespace.Rodney W. Grimes1995-05-3066-320/+320
| | | | | | | Reviewed by: phk Notes: svn path=/head/; revision=8855
* Describe -m optionAndrey A. Chernov1995-05-061-2/+11
| | | | Notes: svn path=/head/; revision=8308
* typo there --> theirAdam David1995-05-051-9/+16
| | | | Notes: svn path=/head/; revision=8294
* From "Philippe Charnier" <charnier@lirmm.fr>:David Greenman1995-05-051-1/+5
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=8289
* Support nonstandard (not yet all supported) flow control options. `ctsflow'Bruce Evans1995-04-292-7/+32
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=8170