Results 1 to 4 of 4

Thread: csh "history" is picky!

  1. #1
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,175

    Default csh "history" is picky!

    I've had to use csh to run some climate software, so I often have 2 or 3 csh terminals open; however, the history only gets stored from one of them. Does anyone know of a command that will store the history from all the open csh terminals? (I believe bash does this) Nifty Linux Trix #243

  2. #2

    Default Re: csh "history" is picky!

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    I never use csh, mostly because it is terrible after using bash, but
    I've noticed something that MAY be interpreted as the same issue in
    bash. The history is written, in my experience, only when you exit a
    shell. As a result if you run `ls -l` in shell 0 and then try to find
    that command in your history in shell 0, it's there, but if you look in
    shell 1 it is not there. Exiting all shells and opening a new one, the
    history shows it as you'd expect (because all of the shells wrote out
    their history to ~/.bash_history so any new shells after the exits will
    get the history of all of them). Anyway, maybe what you're seeing but
    maybe not.

    Good luck.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.18 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJP9ciaAAoJEF+XTK08PnB5BmcP/jaLfI9DD/kvq6R/7wIqGDzD
    X6hbIl2G0BeHqHr6GLM9vbiQQFu5Lc4fux0/PI5WIM5QDfRZflmokzI8D1VKz6Rj
    2HZZZvShcHnr7x6WDf4y1gbOOyvyYca7eEZlgZuPzT7zVynPu8Caiw4SyhxTvo/I
    BA3dbUvfWCX7nUCgFGM1j8ZJk7p8iN7Szy+GrJV21jxveiZrsYF8ayj7wB2kdwOH
    9sMJK7REoNUKXJIUjk03I+S+oIAQmy95vnEMHuv/mEnpnBFhlZLwmmBwQ/dg3P4C
    FiMbZf7pmjZ3YNu+hjXtphMP8hlmnejNp+PIe7pwJQpGdVXbWACWrOHynqk4eXOS
    Ho2JtoawhECNHEtBytUcY0DpTxynFa2/GSmLe24NOJ4Sld/kF4pC0K0aEPckxaY/
    0RZ5LmxTqklIa74UiM+OQJvHlIqT6ZJmbyAXHlcPJ6Gabqh8WyqLkf6xDJxDT9E/
    qL6PqcbK7v5JJ0q3Xvp/bo0GTDCFV+0MtVwHG37vAoN8ZgNyPw2svliVFJ3yVVko
    R2UMCcEY41m0i5Z4OBcv7Zud2H4H1yfRDqW13fmUPpiIW5GyPv/Lr1+E38KbPZT0
    Sb6BPmqM/+iEujLrojQw+Xtg6rsRIXUvp+94rVmmNY3V4otGxGXzmY1s0MMR4dk1
    d2otliLxcDxShOQHruEe
    =JK1B
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,175

    Default Re: csh "history" is picky!

    Quote Originally Posted by ab View Post
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    I never use csh, mostly because it is terrible after using bash, but
    I've noticed something that MAY be interpreted as the same issue in
    bash. The history is written, in my experience, only when you exit a
    shell. As a result if you run `ls -l` in shell 0 and then try to find
    that command in your history in shell 0, it's there, but if you look in
    shell 1 it is not there. Exiting all shells and opening a new one, the
    history shows it as you'd expect (because all of the shells wrote out
    their history to ~/.bash_history so any new shells after the exits will
    get the history of all of them). Anyway, maybe what you're seeing but
    maybe not.

    Good luck.
    OIC - so you're saying the history of the *last* instance of a csh that I close is what gets saved. Got it! OK - well, at least that solves my problem, thanks. There are lots of programmers still writing code using csh - I guess it's a scripting thing?
    Patricia

  4. #4

    Default Re: csh "history" is picky!

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    > OIC - so you're saying the history of the *last* instance of a csh
    > that I close is what gets saved. Got it! OK - well, at least that
    > solves my


    Well, just to be clear, I know that's how bash works, and to be a little
    more clear it's not just the last one that gets saved, they all get
    saved, but the history is ONLY written when a shell closes so the order
    in the ~/.bash_history file is based on the order in which the commands
    happened somewhat, but those groups of commands (from shells) are
    written in the order that the shells were closed. That seems to be a
    very redundant and repetitive statement but there you go.

    > problem, thanks. There are lots of programmers still writing code
    > using csh - I guess it's a scripting thing?


    I do not know; I've never seen t he appeal but I've never felt a lack in
    other shells sufficient to force me to try another.

    Good luck.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.18 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJP9ucdAAoJEF+XTK08PnB5eNQQAI/S4Sd6VmHNQlqSEFqPklQp
    WWLLy+MK+Wq1zmmdZU88rlTiZPogOTmuI9waFHJS9q95IFp5bv2aS8+dyUpAgoQR
    +aCePN7tDF8td+3sMb3znRknAb3ulXbhXKt9AUUXlIJmfigkchaH+jVbvnxEoeBY
    bv2CGxDyWUlZ5FMPqZHh47hw5jYBafXO7fxYmV5sUvB0JuG8TOvYeJT3sVa30CPr
    O5Cgch2uKCoTWD2h3nORN4h9N0H1oe2/x33pEozdMvqv/v3ZrttfH5sB1BRxgCaq
    R71Atm4X8XZvERJTiEvHWSd02+sa2qvPAqeVZazJdSc11gvMf1tLrq/TzKgHv/bR
    t7LxuIdlGr7YCkp+sT99grJn04m9uRGuPoN5RRRC4a5M2GHoWzZZyOZe+4xMpYoT
    JKM566Z+pAxI9v1P7Ij1kfUSBwqEdeIOTJMSEvAWHib80jK7DtB+BCVXLN7HTHDv
    scrbS21J7LkgmvKbpXOwoIFsQV2g2Z+3wUi88PubrHFEZY1IjI7g/pbZr7m+KTUT
    Qj1sUSOtMOhpkGQZ8E6cyYzg5qrE/oY+wzVqkAbRZNw9hXGeROA61FJV/7Ym0/y1
    etYMchpbGcq6b7MOlhoPFlUuSpiWyG1bBtLtT5SMcHmkdqchPJkRGpzLzOw9kAAp
    CEGaj1Q26iR31LJGltNm
    =kuZu
    -----END PGP SIGNATURE-----

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •