Unix Shell - Resetting line number in tcsh (history -L)

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > November 2005 > Resetting line number in tcsh (history -L)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Resetting line number in tcsh (history -L)
Ilya Zakharevich

2005-11-27, 5:53 pm

I want to share the user input history of a shell time to time. With
tcsh,

alias synchistory 'history -S; history -L'

works fine as far as the history file is concerned (I have necessary
counts, merging etc enabled). However, it increments line numbers in
the in-memory shell history by 3200 each time it is called (this is
the count of lines to keep). This is too confusing.

One solution to this increment problem would be to reset the line
number to 0 (or some other suitable number) between `history -S' and
`history -L'. Is there a way to do this?

Thanks,
Ilya
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com