Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucsdhub!hp-sdd!hplabs!hpfcso!hpfcmgw!hpfcse!hpuecoz!hpuecoa!speclab!rclark From: rclark@speclab.bgp-usgs.gov (Roger N. Clark) Newsgroups: comp.sys.hp Subject: Re: CI.STK history function Message-ID: <210046@speclab.bgp-usgs.gov> Date: 27 Feb 90 14:52:00 GMT References: <1990Feb19.235123.5458@sjuphil.uucp> Organization: U.S. Geological Survey, Branch of Geophysics, Denver Lines: 33 > 1) alias / 'history | sed -e "s/.......//" -e "\~^//* *"\$"~d" | > 2) tail -\!*; line > /dev/null; /bin/echo "\033J\033R\033A\033d\021\c"' > > 3) alias // 'history | sed -e "s/.......//" -e "\~^//* *"\$"~d" | > 4) tail -1; /bin/echo "\033A\c"; line > /dev/null; > 5) /bin/echo "\033J\033R\033A\033d\021\c"' It would be more efficient (and it seems from the conversation on this note that some don't know all the features of history) that instead of using tail, to say how many history lines you want. For example: history | tail -1 is the same as: history 1 To save typing, try: alias history 'h' h 1 Similarly, instead of history | sed ... | tail -\!* use history \!* | sed ... (It will also execute slightly faster). Roger N. Clark rclark%speclab.uucp@csm9a.colorado.edu # Internet