From owner-freebsd-questions@freebsd.org Fri Jan 10 19:35:52 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46DAF1F17CC for ; Fri, 10 Jan 2020 19:35:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47vY9z22STz43Sc for ; Fri, 10 Jan 2020 19:35:50 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([188.102.107.138]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1Mlejs-1jYRVV1Pso-00io8M; Fri, 10 Jan 2020 20:35:43 +0100 Date: Fri, 10 Jan 2020 20:35:42 +0100 From: Polytropon To: byrnejb@harte-lyne.ca Cc: "James B. Byrne via freebsd-questions" Subject: Re: /bin/sh save history Message-Id: <20200110203542.8022d7c3.freebsd@edvax.de> In-Reply-To: <0dbba1cf7eeb52e8f398d61434eaceb4.squirrel@webmail.harte-lyne.ca> References: <0dbba1cf7eeb52e8f398d61434eaceb4.squirrel@webmail.harte-lyne.ca> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:DtSpHLmIW4PZOEo9NYRm4cn9boajBS5flUYHiOsMSthLNspN1rQ XPjBTGBN+98hT+Qj0bvsJwP+Csam+N1fh4jV1N7nKU4hU6dj8tTLXRFRtMGDWzxV0gdGbCA A6FUmeAVkWNzSYeeFwR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ue-Id: 47vY9z22STz43Sc X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.17.10) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[138.107.102.188.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.69)[0.692,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.96)[0.958,0]; RCVD_IN_DNSWL_NONE(0.00)[10.17.227.212.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[10.17.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.05)[ip: (-0.82), ipnet: 212.227.0.0/16(-1.15), asn: 8560(2.23), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2020 19:35:52 -0000 On Fri, 10 Jan 2020 10:23:45 -0500, James B. Byrne via freebsd-questions wrote: > Is there no way to specify a history file for /bin/sh and > automatically save / merge the session hitory with that of previous > and concurrent sessions? According to "man sh", this isn't supported by the shell. However, /bin/sh never really was intended for interactive use - it's FreeBSD's default _scripting_ shell, and, per preconfiguration, the emergency shell you get in single user mode (which typically doesn't stop you to launch a more user-friendly shell in case there's more interaction ahead). > I have searched the man page and done the online thing but cannot seem > to find any reference to a means to save the session history of > /bin/sh. Is it just not possible? Doesn't seem to be possible, but re-check with "man sh". Of course the C shell (tcsh in FreeBSD), FreeBSD's default interactive shell, does have this feature which you can control with ~/.cshrc: set history = 200000 set savehist = (200000 merge) It will maintain a ~/.history file. Now of course is the time to remind you that there are shells better suited for interactive use, such as bash or zsh, but as a long-time C shell user I won't mention anything else. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...