🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #3997

Re: Bash equivalent of cmd /k switch

#3997
From: Huibert Bol
Date: Tue, 02 Jun 2009 20:16
14 lines
1667 bytes
Ben wrote:

> My question is, is there a bash equivalent of the cmd.exe /k switch
> that can be used to execute a command and then remain open?

Not exactly, but you can get almost the same effect using:

$ bash -c 'your-command; exec bash'

-- 
Huibert
"The Commercial Channel! All commercials all the time.
 An eternity of useless products to rot your skeevy little mind, forever!"
   -- Mike the TV (Reboot)
Technical Details
Message-ID: <h041bq$sr3$1@news.eternal-september.org>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!feeder.motzarella.org!news.motzarella.org!news.eternal-september.org!not-for-mail
References: <c7e2ac57-0e67-4727-a1ca-f5e4adea3803@r16g2000vbn.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 4d82dd0a1,dfab991ae69ee2e
X-Google-Attributes: gid4d82dd0a1,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!feeder.motzarella.org!news.motzarella.org!news.eternal-september.org!not-for-mail
From: Huibert Bol <huibert.bol@quicknet.nl>
Newsgroups: comp.unix.shell,comp.unix.programmer,gnu.bash
Subject: Re: Bash equivalent of cmd /k switch
Date: Tue, 02 Jun 2009 22:16:54 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <h041bq$sr3$1@news.eternal-september.org>
References: <c7e2ac57-0e67-4727-a1ca-f5e4adea3803@r16g2000vbn.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.eternal-september.org U2FsdGVkX19pC+DEBJRkmiAd+pMvSgUmKj1jSIcFyvI3H3hBs2bwC+7L3ryvoGFbGzwMs3sL9FbayDdtqCNzoWdDXIiy7Fg7R7PLvewX2HvaeXz478NbreMRJljdG7W6UuiiKsNfFcXG7y98j/HwHw==
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Tue, 2 Jun 2009 20:16:58 +0000 (UTC)
X-Auth-Sender: U2FsdGVkX1+si07t7uqYRn8MxO3xpopTf5ucVAe2T7A=
Cancel-Lock: sha1:wkjP2cvhfIPjNNYmdx5DjyUqakc=
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)