<html><head></head><body>Why not just use sudo instead of su? Then your history stays in one place, and only the commands that need to run as the other user do.<br>
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.<br><br><div class="gmail_quote">Tom Hanlon <tom@functionalmedia.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif">Colug, <br /><br />I find myself in training classes as the instructor where a student or myself has performed a number of steps while logged in as the incorrect user. <br /><br />So I point this out, and they su as needed. <br /><br />But the history is left as entered in the wrong user history file. <br /><br />Does anyone here have any quick tricks to su but also grab the last 10 lines or so of history ? <br /><br />I am thinking I could write up a shell script, but thoughts on shortcuts. <br /><br />history 10 >> new user history file or something ? <br /><br />--<br />Tom <br /><br /><br /><br />Tom Hanlon<br />tom@functionalmedia.com<br />Cloudera Certified Hadoop Developer<br />Certified MySQL DBA<br /><br /><br /><hr /><br />colug-432 mailing list<br />colug-432@colug.net<br /><a
href="http://lists.colug.net/mailman/listinfo/colug-432">http://lists.colug.net/mailman/listinfo/colug-432</a><br /></pre></blockquote></div></body></html>