🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #4002

Re: Bash equivalent of cmd /k switch

#4002
From: Janis Papanagnou
Date: Wed, 03 Jun 2009 00:12
40 lines
2191 bytes
David Schwartz wrote:
> On Jun 2, 1:56 pm, Nate Eldredge <n...@vulcan.lan> wrote:
> 
> 
>>You could write your command to a file, and use --rcfile to point to
>>it.  But I'm having a hard time understanding why you want to do this;
>>most of the things I can imagine to do with this have better ways of
>>doing them.  What's your goal here?
> 
> 
> My guess would be that he wants to set up the shell in a special way.
> Maybe he wants to set environment variables, the prompt, the current
> working directory, and so on. This way, he can drop the user into a
> shell especially configured for some application.

So probably one of...

bash   # start instance
cmd1
cmd2
cmd3
exit   # leave instance

or...

bash <<< "cmd1; cmd2; cmd3"

or...

bash << EOT
cmd1
cmd2
cmd3
EOT


Janis

> 
> DS
Technical Details
Message-ID: <h04f5s$4n2$1@svr7.m-online.net>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news2.arglkargh.de!noris.net!news1.nefonline.de!news.m-online.net!not-for-mail
References: <c7e2ac57-0e67-4727-a1ca-f5e4adea3803@r16g2000vbn.googlegroups.com> <86eiu2cq2e.fsf@vulcan.lan> <0d67cc76-a21f-40d0-a44f-16df03f78337@t10g2000vbg.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!news1.google.com!news.glorb.com!feeder.erje.net!news2.arglkargh.de!noris.net!news1.nefonline.de!news.m-online.net!not-for-mail
From: Janis Papanagnou <janis_papanagnou@hotmail.com>
Newsgroups: comp.unix.shell,comp.unix.programmer,gnu.bash
Subject: Re: Bash equivalent of cmd /k switch
Date: Wed, 03 Jun 2009 02:12:43 +0200
Organization: (posted via) M-net Telekommunikations GmbH
Lines: 40
Message-ID: <h04f5s$4n2$1@svr7.m-online.net>
References: <c7e2ac57-0e67-4727-a1ca-f5e4adea3803@r16g2000vbn.googlegroups.com>  <86eiu2cq2e.fsf@vulcan.lan> <0d67cc76-a21f-40d0-a44f-16df03f78337@t10g2000vbg.googlegroups.com>
NNTP-Posting-Host: ppp-88-217-60-10.dynamic.mnet-online.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: svr7.m-online.net 1243987964 4834 88.217.60.10 (3 Jun 2009 00:12:44 GMT)
X-Complaints-To: abuse@m-online.net
NNTP-Posting-Date: Wed, 3 Jun 2009 00:12:44 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4
X-Accept-Language: en-us, en
In-Reply-To: <0d67cc76-a21f-40d0-a44f-16df03f78337@t10g2000vbg.googlegroups.com>