Commit Graph

20 Commits

Author SHA1 Message Date
christos d3aec2060d Fix PR/2070: Ksh style variable modifiers were broken in /bin/sh, from
enami tsugutomo
1996-02-12 15:11:41 +00:00
christos fbac2e9de2 Fixed new bug the previous fix introduced:
false
    foo=bar
    echo $?

would print 1
Also fixed the long standing bug:

    false
    echo `echo $?`

would print 0
The exitstatus needs rethinking and rewriting. The trial and error method
is not very efficient
1995-05-15 02:47:38 +00:00
christos 07bae7eddd Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
bug.
1995-05-11 21:28:33 +00:00
cgd 49f0ad8601 convert to new RCS id conventions. 1995-03-21 09:01:59 +00:00
christos 5c42185b5c Oops... typo in the IFS previous fix. 1995-02-28 23:27:24 +00:00
christos 6ab1954578 Changed so that backquote expansion eats all trailing newlines, not just
the last one.
Reported by guido@gvr.win.tue.nl (Guido van Rooij).
Repeat By:

	echo "`cat file-with-many-newlines`"
1995-02-28 23:09:43 +00:00
christos 3936aab031 Changed IFS string-splitting so that it breaks spaces even when IFS does not
begin with a space, but contains one. Fixes PR bin/809.

        #!/bin/sh
        list="a  b c "
        echo "With ordinary IFS"
        for i in $list;do
            echo $i
        done
        IFS=":${IFS}"
        echo "With changed IFS"
        for i in $list;do
            echo $i
        done

Note that before the fix ":${IFS}" behaved differently than "${IFS}:".
1995-02-28 22:46:12 +00:00
christos ad8d5369f5 I added the documented in the manual but not implemented variable expansions:
${#WORD}
    ${WORD%PAT}
    ${WORD%%PAT}
    ${WORD#PAT}
    ${WORD##PAT}
1995-01-23 06:33:03 +00:00
cgd 5dad143982 from James Jegers <jimj@miller.cs.uwm.edu>: quiet -Wall, and squelch
some of the worst style errors.
1994-12-04 07:11:37 +00:00
mycroft d22a514772 Fix problem with character classes matching a terminating NUL, from Henry
Spencer.
1994-08-29 01:54:39 +00:00
mycroft cafd1f7e9f Add RCS ids. 1994-06-11 16:11:35 +00:00
jtc a81e412494 Include appropriate header files to bring function prototypes into scope. 1994-05-12 17:03:32 +00:00
jtc 37ed7877b2 sync with 4.4lite 1994-05-11 17:09:42 +00:00
mycroft c823b55cfa Last patch was wrong; just save argbackq around the argstr() call. 1993-10-22 13:32:22 +00:00
mycroft 718ac53f6f evalvar(): If subtype is VSASSIGN (or VSQUESTION), argstr() already rolled
forward the backquote queue.  If VSQUESTION it doesn't matter because we
already exited with an error.
1993-10-22 13:20:02 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +00:00
sef 5916a08554 Jim "wilson@moria.cygnus.com" Wilson's patches to make C News (and other
things) work.
1993-05-02 01:28:40 +00:00
cgd 06be60083d changed "Id" to "Header" for rcsids 1993-03-23 00:22:59 +00:00
cgd 346aa5dd48 added rcs ids to all files 1993-03-22 08:04:00 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00