|
|
Up |
|
|
  |
Author: spy_234432spy_234432
Date: Aug 19, 2008 08:47
I want to exit completely from my script upon error. The problem is
that when I have functions, and I do something like
exit 11
It only exits from the function. I've read through the posts, and
there are two solutions that I think might work for me. The first
solution is to execute the function within the first shell, e.g.
exec function
I tried this solution and it doesn't appear to be working for me.
Since there are so many functions in the script I am trying to modify
and they seem to call each other, I am not sure if I missed one.
The other solution I have found is to do
kill $$
I don't think that this is a very clean way of exiting from a script,
and it also won't assign the exit code that I want.
Does anyone else have any other solutions? Thanks, Margaret
|
| |
|
| |
1 Comment |
|
  |
Author: xiaoxiao
Date: Aug 19, 2008 08:18
hi~ all ~ there is a script like this :
set FilePrefix=${HdfFile:r}
${BinDir}/CloudStatsModis ${InputDirectory} ${FilePrefix}.class
${InputDirectory}/stats
CloudStatsModis is an executable file when I tried to run it .the file
prefix included the path of the file. And I just want to include the
file name not the path. How can I do that ?
Thank you
|
| |
|
| |
no comments
|
|
  |
Author: Henry TanHenry Tan
Date: Aug 19, 2008 00:32
Hi all,
I wonder if it is possible to do the above. I have a list of process
that I need to see if it is running so i saved them in a text file. Is
it possible I can do a ps -ef on the processes in the text file and it
will return me the processes that are in the text file but is not
running in the system? Thanks in advance.
|
| |
|
4 Comments |
|
  |
|
|
  |
Author: xufuturexufuture
Date: Aug 18, 2008 13:15
Dear all:
I have a task like that:
Given an .exe(C), a .jar(J), and a textfile T0, my shell should
include following steps
1.C loadin T0, then output result R1;
2.J loadin R1, then output a updated textfile T1;
3.C loadin T1, then output result R2;
4.J loadin R2, then output a updated textfile T2;
...
...
After hundreds of turns, it ends based on a criteria.
I am not sure know how to decide whether the above step has
completed for each incoming step.
Would you please show a framework of code in normal unix environment.
Thank you for your help!:)
Sincerely yours,
Jie
|
| |
|
1 Comment |
|
  |
Author: xufuturexufuture
Date: Aug 18, 2008 13:04
Dear all:
I have a task like that:
Given an .exe(C), a .jar(J), and a textfile T0, my shell should
include following steps
1.C loadin T0, then output result R1;
2.J loadin R1, then output a updated textfile T1;
3.C loadin T1, then output result R2;
4.J loadin R2, then output a updated textfile T2;
...
...
After hundreds of turns, it ends based on a criteria.
I don;t know how to decide whether the above step has completed in
our HPCC environmet?
If it is difficult to do it in HPCC, please show a framework of code
in normal unix environment, since I am still not very familiar with
Shell Programming.
Thank you for your help!:)
Sincerely yours,
Jie
|
| |
|
1 Comment |
|
  |
Author: jatin.chandokjatin.chandok
Date: Aug 18, 2008 07:45
How can we findout the hostname which we can ping from UNIX box?
|
| |
|
1 Comment |
|
  |
|
|
  |
Author: apogeusistemasapogeusistemas
Date: Aug 18, 2008 06:35
Hi:
I create a FS script to send e-mail when a FS hit 90%%
This e-mail is received in a Outlook Express box, and I´d like know if
is there
any code to set colors. I want the message below in red color:
File system /bd2/diskdata hit 90%% capacity
Is this possible ?
|
| |
|
1 Comment |
|
  |
|
|
  |
Author: StephaneLeFouStephaneLeFou
Date: Aug 18, 2008 05:52
Hi,
I wrote a script that:
1) Enumerates the files matching pattern
2) For each file matching the pattern, show its content line by line.
It works fine, until one of the files in step (2) contains spaces in a
line.
For example, I want to output the content of all the files matching
this pattern: *TRIG*.
Let's say you have only 1 file matching the pattern: "myfileTRIG01"
And its contents:
-------begin of content
/somefolder/incoming/A001;03;00000010
/somefolder/incoming/A002 ;04;0000012
-------end of content
using the script below, either "cat" or "awk" cause the script to
display line 2 (above) in 2 parts:
"/somefolder/incoming/A002"
";04;0000012"
instead of a single line: "/somefolder/incoming/A002 ;04;0000012
|
| Show full article (1.26Kb) |
|
4 Comments |
|
|
|
|
|
|