getting shell variables in parent-shell which were defined in a sub-shellHello,
I have following problem:
I need to define a bunch of shell variables in a shell script, so I
decided to put all the set commands
in a seperated shell script file which I wanted to execute in my main
shell script.
Unfortunately all shell variables which were defined during execution
in the sub-shell
are unknown to the parent-shell.
My question is if there is any way to do things this way. (perhaps
using another shell-flavour?)
Thanks in advance
--------------------------------------
main shell script (executed in parent-shell):
#!/bin/tcsh
....
definemyvariables.sh
....
shell ...
Announcing DocumentationDownload Them Here:
http://www.aztecmuseum.ca/extras/shellme2013.pdf
http://www.aztecmuseum.ca/extras/shellmetoo2013.pdf
This documentation is free (but not easy) and it is not available in any
store. It may have been 30 years ago if you had a wack of money lying
around.
But if you saw my last couple of announcements for the RAT and RD (Random
DUMP Hex Viewer) and you need a compelling reason to bother with them, I
don't think these will do that for you. Not a chance!
Note: Nor is it necessary to send me a dollar, and if I keep this-up I'll
need to send you a dollar to stay off your blocked sender's list so I'll
keep this shorter than usual.
I have been reformatting the Aztec C DOS 3.3 Shell Documentation (and the
rest of Rubywand's Aztec C65 Mini-Manual) in the course of my
retro-development project that I call Aztec33.
And if you already have the RAT and RD, you already have these in the
bundle.
The End (for now)
All the Best,
Bill
You are one prolific dude. Sorry I haven't had more time to check out your tools, but it sure sounds like you're having fun. Keep it up!
"dagz" <DagenBrock@gmail.com> wrote:
>You are one prolific dude. Sorry I haven't had more time to check out your
>tools, but it sure sounds like you're having fun. Keep it up!
That should be easy by now...
I'm following Rubywand's (Jeff Hurburt's) breadtrail on this one ...
shellhello everyone i am pretty new to linux. so can anybody tell me about
free ebooks available for learning shell programming.
TIA
On Fri, 1 Aug 2008 21:40:43 -0700 (PDT), mu91t wrote:
> hello everyone i am pretty new to linux. so can anybody tell me about
> free ebooks available for learning shell programming.
http://tldp.org/LDP/abs/html/index.html may shed some light on one
shell language.
...
shellHello,
I know I can start programs with shell. But how do I do that without
specifying the actual program and instead rely on the extention of the file
I 'shell'. Example: shell xxx.txt and notepad is started with the file
xxx.txt.
Thanx
Frank
Frank wrote:
> Hello,
>
> I know I can start programs with shell. But how do I do that without
> specifying the actual program and instead rely on the extention of
> the file I 'shell'. Example: shell xxx.txt and notepad is started
> with the file xxx.txt.
>
> Thanx
>
> Frank
...
shellcomp.os.minix
shell script question
the statement:
PATH=$PATH:/usr/xxx
export PATH
doesn't work from a shell script on 2.xxx - any idea why?
Hul
Hul Tytus wrote:
> comp.os.minix
> shell script question
>
> the statement:
> PATH=$PATH:/usr/xxx
> export PATH
> doesn't work from a shell script on 2.xxx - any idea why?
>
> Hul
>
>
It's because you are keeping your porn in /usr. Try relocating your porn
to /home or /root
SHVsIFR5dHVzIHdyb3RlOgo+IGNvbXAub3MubWluaXgKPiBzaGVsbCBzY3JpcHQgcXVlc3Rpb24K
Pgo+IHRoZSBzdGF0ZW1lbnQ6Cj4gUEFUSD0kUEFUSDovdXNyL3h4eAo+IGV4cG9ydCBQQVRICj4g
ICAgICAgICBkb2Vzbid0IHdvcmsgZnJvbSBhIHNoZWxsIHNjcmlwdCBvbiAyLnh4eCAtIGFueSBp
ZGVhIHdoeT8KPgo+IEh1bAo+Cj4gGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa
GhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa
GhoaGhoaGgpDb3VsZCB5b3UgZ2l2ZSB1cyBtb3JlIGNvbnRleHQ/ICBXaGF0IGRvIHlvdQptZWFu
IGl0IGRvZXNuJ3Qgd29yaz8gQ2FuIHlvdSBnaXZlIGFuIGV4YW1wbGU/CldoYXQgc2hlbGwgYXJl
IHlvdSB1c2luZz8gZXRjLgoKVGhhbmtzCkhhcmxleQo=
The shell is sh.
If the statements are used outside of a script, ie as a command line,
there after a program locally compiled & linked can be executed.
If the path & export statements are place in a file "...
ShellI have been away to long!
How do I run whatever application is associated with a particular file
i.e. If I want to view a pdf file
I tried shell "foo.pdf" to no avail
Thanks
Jack Russell
--
Remove norubbish to reply
Jack Russell <jackr@norubbish.tpg.com.au>'s wild thoughts
were released on Tue, 30 Oct 2007 18:55:32 +1100 bearing the
following fruit:
>I have been away to long!
>
>How do I run whatever application is associated with a particular file
>
>i.e. If I want to view a pdf file
>
>I tried shell "foo.pdf" to no avail
Post your exact code, in the meantime you might want to
check out http://vbnet.mvps.org/code/shell/shellexecute.htm
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde
Jan
Many thanks, the example solved my problem perfectly.
Jack Russell
Jan Hyde (VB MVP) wrote:
> Jack Russell <jackr@norubbish.tpg.com.au>'s wild thoughts
> were released on Tue, 30 Oct 2007 18:55:32 +1100 bearing the
> following fruit:
>
>
>>I have been away to long!
>>
>>How do I run whatever application is associated with a particular file
>>
>>i.e. If I want to view a pdf file
>>
>>I tried shell "foo.pdf" to no avail
>
>
> Post your exact code, in the meantime you might want to
> check out http://vbnet.mvps.org/code/shell/shellexecute.htm
>
>
> --
> Jan Hyde
>
> https://mvp.support.microsoft.com/pr...
ShellI want to make myself, for whim, a bar of tools in Realbasic. As I can make
a Shell in a button so that when pressing it an external program it is
executed, as Wordpad, for example?. Thank you and a greeting.
I already know like one makes to make Shell. Now I have the doubt as for the
position of the exercise. As making that the shortcuts can crawl to the bar
and be permanent?. Thank you and a greeting.
"juan" <juanfblanco@hotmail.com> escribi� en el mensaje
news:l2cJc.1511435$A6.5955228@telenews.teleline.es...
> I want to make myself, for whim, a bar of too...
can I run unix shell command in the ModelSim shell?Hi,
Just wonder if I can run unix shell command in the Modelsim shell,
expecially those time/date command?
Thanks.
clinton__bill@hotmail.com wrote:
> Hi,
> Just wonder if I can run unix shell command in the Modelsim shell,
> expecially those time/date command?
ModelSim uses Tcl as its scripting language so (almost) anything you can
do from Tcl can be done in ModelSim. Tcl has a variety of shell and file
interaction commands available. Of course, if you want to execute Unix
commands, you need to be running on a Unix (or Cygwin) system. Note that
Tcl commands are NOT direct...
Shell Command to clear up the current shellIs there any shell (e.g. bash) command to clear up the current shell
screen? Thanks.
Thus spake thuang2@hotmail.com (thuang2@hotmail.com):
> Is there any shell (e.g. bash) command to clear up the current shell
> screen? Thanks.
clear
--
/* Christian 'strcat' Schneider <strcat@gmx.net> */
char*a="char*a=%c%s%c;main(){printf(a,34,a,34,10);}%c";main(){printf(a,34,a,34,10);}
>> Is there any shell (e.g. bash) command to clear up the current shell
>> screen? Thanks.
>clear
Thanks. It works.
Le Fri, 07 Apr 2006 17:34:29 -0700, thuang2@hotm...
execute a shell script in a shell scriptPlease help.
I have been stumbled on this issue, please see below. I am unable to
execute a shell script in a shell script.
I need to use perl script but not others and have tried eval, -exec
and other on perl script but failed.
system"cleartool setview -exec \"cleartool describe -fmt 'On %Sd
modified %En and comment:\n %c\n\n' /myproject/vob/myprogram.C\"
my_lag ";
tks.
On Dec 3, 8:30 am, moongeegee <moongee...@gmail.com> wrote:
> Please help.
> I have been stumbled on this issue, please see below. I am unable to
> execute a shell script in a shel...
ShellsHello All,
Under SCO Unix 5.0.7 how does one get rid of shells (-sh) left behind
when people rlogin/telnet into sco from windows and then shutdown PC
or close application without login out , Do these consume the pttys
untill the system limit is reached and then no one can log in without
rebooting server ?
Is there some auto script one could run to get rid of these -sh
#ps -ef
root 2133 2083 2 23:43:46 ttyp0 00:00:00 su
test 1919 1 72 22:38:14 ttyp2 00:29:50 -sh
test 1957 1 71 22:48:19 ttyp3 00:28:56 -sh
# who
root ttyp0 Jun 1 23:35
#
note who does...
Shells?Hi,
I'm new to UNIX I was just wondering what is the most common UNIX shell
the is used? csh?
Cheers
On 2004-10-25, Rapier <a@a.com> wrote:
> I'm new to UNIX I was just wondering what is the most common UNIX shell
> the is used? csh?
Defaults that I know of: csh (or tcsh) on *BSD, bash (posing as /bin/sh,
ICK) on linux systems. sh (real sh) on some unices, ksh on some others.
For any user but root it is common practice to take a shell you like and
use that as your login shell. (And you can switch shells, using chsh(1).)
I think the choice is about as personal...
Which shell?I am trying to create a build environment (again). This time I think I
am close achieving my goal.
I have found that the shell program seems to make a significant
difference. For example, there are shell programs where the TYPE
and/or TEST commands are broken.
Is there a "best" or recommended shell program to use when building
software? (BASH, ASH, etc)
Is there a "best" or recommended version of this shell program to use?
Since file dates and times are seemingly meaningless (programs with
differing dates/times claiming to be the same version), is there a
consisten...
which shellSometimes I forgot exiting out of subshell. How do I know which shell
I am at?
> echo $SHELL
/usr/bin/ksh
>
> bash
> echo $SHELL
/usr/bin/ksh
>
> exit
exit
>
> sh
> echo $SHELL
/usr/bin/ksh
Thank you,
victor
Victor <victorfeng1973@yahoo.com> wrote:
> Sometimes I forgot exiting out of subshell. How do I know which shell
> I am at?
>
>> echo $SHELL
> /usr/bin/ksh
>>
>> bash
>> echo $SHELL
> /usr/bin/ksh
>>
>> exit
> exit
>>
>> sh
>> echo $SHELL
> /usr/bin/ksh
>
> Thank you,
>...
Shellinghow do you create a tab delimited file with several columns, with integers in a specific column (e.g., the 11th column)? how would this file be verified?
In article <c275d0a5-ec8b-4370-b061-ae75312cf36c@googlegroups.com>,
"Occam's Razor" <monzia.moodie@gmail.com> wrote:
> how do you create a tab delimited file with several columns, with integers in
> a specific column (e.g., the 11th column)? how would this file be verified?
Perl, php, bash (shell, awk, sed, grep, et al), python
Take your pick.
--
DeeDee, don't press that button! DeeDe...
Shells
Would the differences between cmd.exe and pmshell.exe (I don't know what
they are) account for a cli application running or failing?
On Wed, 20 Aug 2008 01:02:22 UTC, johnsuth@nospam.com.au wrote:
> Would the differences between cmd.exe and pmshell.exe (I don't know what
> they are)
They are completely different things. CMD.EXE is the thing that usually
runs VIO windows while PMSHELL.EXE is the program that starts the WPS.
> account for a cli application running or failing?
?
--
Greetings, | My From: address is valid as is the version without &q...
getchar() -- target shell vs. tornado shellI have an application that waits for any key press at then exits. I
am using the following pieces of code:
....
ioctl(ioGlobalStdGet(0),
FIONREAD,
(int)&charsAvail);
....
if (charsAvail) {
key = getchar();
}
....
This works fine using the console terminal or telnet on my target, but
doesn't work using the tornado shell (WindSh). I have forced the
shell to a lower priority than my application, but still can't capture
a keypress.
Is there anyway to detect a key press in the tornado shell?
any info would be appriciated.
thank you for your time.
KindSol
...
I18N: how to gettextize shell string containing shell variable.Hi,
I am using solaris gettext. I would like to know if there is a way to
internationalize the following echo statement.
echo " This is $1"
where $1 is a place holder of a shell sub-string.
FYI: following modification does not work.
gettext " This is $1"; echo
Please let me know.
Thanks
...
Same App works fine with Shell connected but not without Shell.Hi. I've got an odd problem that it would be great if someone could
give me a few pointers with as to what might be going wrong / what
could be done to correct it.
I've got an application that is downloaded over the ethernet to my
nodes via Simple FTP. The application uses printfs to send debug to
the shell so that the status can be deduced.
In the typical development environment, when a shell is launched and
connected to the target server from within Tornado, the application
works correctly.
In a working environment, (same PC, just Tornado not running) exactly
the same binary progr...
exec a shell with a cmd from another shell and keep it open? I can ...
> exec dtterm -title "mytitle" -e "ls -la"
but in doing so the new shell closes when the cmd is completed plus it
closes the the calling shell!
If I ...
> eval dtterm -title "mytitle" -e "ls -la" , at least the calling shell doesn't close.
Is there a way to keep the new shell open after the cmd is finished?
On May 1, 11:55 pm, cpurv...@csc.com wrote:
Basically I want to be able to open term window (from my application)
and execute some cmd. But, I want the term window to remain open so
user can interact with it.
[using ksh in...
How to convert a shell string (separated by spaces) to a shell array?Let's say I have a shell string a = " this is a shell string" . How do
I convert it
into an array (in C-shell) so that each word in the string is an
element.
In other words, let "b" be the new string. then b[1] = "this". b[2] =
"is"
b[3] = "a" and so on. could someone suggest a simple way to create an
array from this string according to this in C-shell.
Thanks
On 2007-02-23, melroysoares@hotmail.com wrote:
> Let's say I have a shell string a = " this is a shell string" . How do
> I convert it
> into an array (in C-shell) so that each word in the string is an
> element.
> In other words, let "b" be the new string. then b[1] = "this". b[2] =
> "is"
> b[3] = "a" and so on. could someone suggest a simple way to create an
> array from this string according to this in C-shell.
In bash or ksh93:
a=" this is a shell string"
set -f
array=( $a )
See these aticles for reasons against using csh for scripts:
<http://www.grymoire.com/Unix/CshTop10.txt>
<http://www.grymoire.com/Unix/Csh.html#uh-0>
<http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/>
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under ...
Convert Bash shell script to Korn shell scriptThe following bash script works fine to delete all files that are
older than $1 minutes. To execute this script,
bash cleanup +10
find /mypath -type f -cmin $1 -exec rm -f {} \;
Unfortunately, now I just realize I need to make it work in Korn
Shell. Even I
change the header from #!/bin/bash to #!/usr/bin/ksh, and execute the
script by ksh cleanup +10, it still have
different errors:
cleanup[9]: -cmin: not found.
cleanup[10]: -type: not found.
Looks like it doesn't work anymore. I think I need to re-write the
Korn Shell script that do the task.
I tried to search for equivalent Korn shell commands but unsuccessful.
Please help. thanks!!
Matt <jrefactors@hotmail.com> wrote:
> The following bash script works fine to delete all files that are
> older than $1 minutes. To execute this script,
> bash cleanup +10
>
> find /mypath -type f -cmin $1 -exec rm -f {} \;
>
> Unfortunately, now I just realize I need to make it work in Korn
> Shell. Even I
> change the header from #!/bin/bash to #!/usr/bin/ksh, and execute the
> script by ksh cleanup +10, it still have
> different errors:
>
> cleanup[9]: -cmin: not found.
> cleanup[10]: -type: not found.
>
>
> Looks like it doesn't work anymore. I think I need to re-write the
> Korn Shell script that do the task.
> I tried to search for equivalent Korn shell commands but unsuccessful.
>
>
> Please help. thanks!!
Try typing it out on your comma...
prowrap and very custom shells that aren't shells?I'm making a windows service executable running tclhttpd in a very custom
way and was wondering if anyone has "walked the path" using prowrap
(1.4.1) with custom applications that aren't shells. IOW, no call
Tcl_Main is done? I know when wrapped, commands such as source, glob, and
file are either renamed or in some way manipulated to work with the
internal zip file system. I can't use starkits as I need this to work
with 3 year old code that's still being maintained.
New model in place of Tcl_Main would be:
Tcl_FindExecutable
Tcl_CreateInterp
Tcl_Init
__try {
while (!done) TclDoOneEvent
} __except (...) {
/*special stuff*/
}
Tcl_DeleteInterp
Tcl_Finalize
I need the special unwind semantics and the ability to redirect the STD
channels in a low-level manner that will require some core hacks to
support it regarding how worker threads are initialized through
TclpGetStdChannels().
Anyone done custom apps that aren't shells together prowrap? I guess I
could read the source and figure it out..
--
David Gravereaux <davygrvy@pobox.com>
[species: human; planet: earth,milkyway(western spiral arm),alpha sector]
...
can we use shell-like short key in tcl shellin nominal shell, we can use the command line short key such as CTRL
+P (previous command) CTRL+H (backspace) CTRL+ K (delete all the the
end) CTRL + A (go to the begning of the command line.
In tclsh/tcl, when I debug a few lines of scripts, I find it is very
unconvenient withou this kind of short key. so my question is
straigthforward, Is this a bug or feature? Can this kind of thing
done in tclshl? If NOT, is there any work around tips ? any
suggestions?
On May 20, 3:58 am, BingYU <yubin...@gmail.com> wrote:
> in nominal shell, we can use the command line short key such as CTRL
> +P (previous command) CTRL+H (backspace) CTRL+ K (delete all the the
> end) CTRL + A (go to the begning of the command line.
>
> In tclsh/tcl, when I debug a few lines of scripts, I find it is very
> unconvenient withou this kind of short key. so my question is
> straigthforward, Is this a bug or feature? Can this kind of thing
> done in tclshl? If NOT, is there any work around tips ? any
> suggestions?
It would be nice if tclsh had a built-in cross-platform readline type
capability.
You could try using 'rlwrap'.
I start my tclsh as
%rlwrap tclsh
and then all the arrow keys CTRL +A etc seem to do the right thing.
J
On May 19, 8:58 pm, BingYU <yubin...@gmail.com> wrote:
> in nominal shell, we can use the command line short key such as CTRL
> +P (previous command) CTRL+H (backspace) CTRL+ K (delete all the the
> e...