09-28-2014
Thank you for the response.
I was reading about makefile and it seems to me it is about compiling a program.
Probably I wasn't clear with my requirements.
I have a master file X.sh which calls A.sh, B.sh or C.sh depending on menu selection.
Now A.sh has commands separated by semicolon.
for example
do 1 ;
do 2;
do 3;
do 4;
Now in-case "do 2" fails (say due to data issue), the program should prompt me if I wish to resume.Depending on my entry. The program should resume from "do 2" and continue and then go back to the main calling program menu X.sh.
Hope I am clear now.
Is it possible for me to know which line the program A.sh got stuck or failed so I may resume from there only ?
Log files are created irrespective of the program's run status. However, these log files says "Its successful" or "Aborted" if it has failed.
I can read that , but how do I tell the program to resume from the last failed command ?
Last edited by rprasad; 09-28-2014 at 03:21 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I have the following file (tnsnames.ora):
DB10g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = buffy)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB10g)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
... (2 Replies)
Discussion started by: nir_s
2 Replies
2. What is on Your Mind?
Hi everybody,
I am wondering if there is any tool or website out there which can track who is viewing my resume. It is very frustrating when you send your CV or Cover Letter and you receive no feedback from the company, you don't even know if they have checked it out.
Thanks for your help (1 Reply)
Discussion started by: gearyipswich
1 Replies
3. UNIX for Dummies Questions & Answers
I am trying to send email using the "mail" command. I keep getting an "exec failed. errno=2." message.
Here is one the commands I have tried:
mail test@mycompany.com < test1.out
Any ideas what may be causing this error msg? (1 Reply)
Discussion started by: hawkman2k
1 Replies
4. UNIX for Advanced & Expert Users
In our directory there are too many files, & if I try to execute mv *.gz or rm *.l command it fails, providing error string as - 'arg list too long'. This doesnt happen always, is there any way we know, limit on the rm & mv command so we can take care of this failure in future executions ? (9 Replies)
Discussion started by: videsh77
9 Replies
5. Shell Programming and Scripting
I have a script that occasionally has a command here and there that fails and I would like to set my script up to just re run the command if the exit code is 1.
Is there a simple way to do that without if/thens or redirecting to the command again? (5 Replies)
Discussion started by: trey85stang
5 Replies
6. Shell Programming and Scripting
Hi!
I have this situation with 3 shellscripts.
One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1.
Script 1 in turn runs script 2 (import_catalogs_buyer.sh)
Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies
7. Solaris
I'm trying to build some python modules on a Solaris 10 machine. It has gcc as /usr/sfw/bin/gcc.
# CC=gcc python setup.py build
running build
running build_py
running build_ext
cc -c actread.c -o actread.o
unable to execute cc: No such file or directory
error: command 'cc' failed with exit... (8 Replies)
Discussion started by: aussieos
8 Replies
8. Hardware
I would like to get pm-suspend (or any other suspend method) working for a small new desktop computer. It is based on a Zotac GF-8200 ITX motherboard and an AMD Athlon II X@ 240 CPU using ArchLinux x86_64.
The pm-suspend script works, apparently putting the machine into suspend correctly... (0 Replies)
Discussion started by: lagagnon
0 Replies
9. Solaris
Hi, I put a for loop in a script to eject backup tapes from the robot. The command echo' output goes to the log file without problem, but command vmchange's output does not go to the log file although it's working fine. It still displays on the screen. I've tried '2>&1 1>$log', but nothing changed.... (5 Replies)
Discussion started by: aixlover
5 Replies
10. Solaris
Sorry if this is the wrong place for this. I haven't done UNIX Admin in a long time and am trying to update the utilities on a Solaris server so that I can get Apache 2.4.25 installed. I am finding a lot of utilities that are just too far out of date and some versions are no longer supported. So... (0 Replies)
Discussion started by: PJ_Namias
0 Replies
LEARN ABOUT OPENSOLARIS
pmconfig
pmconfig(1M) System Administration Commands pmconfig(1M)
NAME
pmconfig - Configure the Power Management system
SYNOPSIS
/usr/sbin/pmconfig [-r]
DESCRIPTION
The pmconfig utility sets the Power Management and suspend-resume configuration. User has permission to change Power Management configu-
ration using pmconfig only if he is allowed to do so according to PMCHANGEPERM keyword of /etc/default/power. User has permission to change
the suspend-resume configuration using pmconfig only if he is allowed to do so according to the CPRCHANGEPERM keyword of
/etc/default/power. See FILES section below for a description of the PMCHANGEPERM and CPRCHANGEPERM keywords of /etc/default/power.
Based on user permissions, pmconfig first resets the Power Management and/or suspend-resume state back to its default and then reads
the new Power Management and/or suspend-resume configuration from /etc/power.conf and issues the commands to activiate the new configu-
ration. The pmconfig utility is run at system boot. This utility can also be run from the command line after manual changes have been made
to the /etc/power.conf file. For editing changes made to the /etc/power.conf file to take effect, users must run pmconfig.
The preferred interface for changing Power Management and suspend-resume configuration is dtpower(1M).
OPTIONS
The following options are supported:
-r Reset Power Management and suspend-resume state to default and exit. User must have both Power Management and suspend-resume
configuration permission for this option.
EXIT STATUS
The following exit values are returned:
0 Upon successful completion
>0 An error occurred
FILES
/etc/power.conf System Power Management configuration file
/etc/default/power File that controls permissions for system's Power Management and suspend-resume features. The PMCHANGEPERM keyboard
controls the Power Management configuration permissions, while the CPRCHANGEPERM keyword controls the suspend-resume
configuration permissions.
Allowed values are:
all Any user can change the configuration.
- No one except super-user can change the configuration.
<user1, user2,...> A user in this user list or a super-user can change the configuration. The user list is a space and/or comma (,)
separated list. You must enclose the list in < and > characters.
console-owner A user who owns the system console device node or a super-user can change the configuration.
The default values are PMCHANGEPERM=console-owner and CPRCHANGEPERM=console-owner.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWpmu |
+-----------------------------+-----------------------------+
|Interface stability |Unstable |
+-----------------------------+-----------------------------+
SEE ALSO
svcs(1), powerd(1M), power.conf(4), svcadm(1M), attributes(5), smf(5), cpr(7), pm(7D)
Using Power Management
NOTES
The pmconfig service is managed by the service management facility, smf(5), under the service identifier:
svc:/system/power:default
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser-
vice's status can be queried using the svcs(1) command.
DIAGNOSTICS
If the program cannot open the configuration file, it prints an error message to standard error. If the program encounters a syntax error
in the configuration file, it prints an error message and the line number of the error in the configuration file. It then skips the rest
of the information on that line and processes the next line. Any configuration information already processed on the line containing the
error is used. If user does not have permission to change Power Management and/or suspend-resume configuration, and configuration file has
entries for which user doesn't have permission, it process the entries for which user has permissions and prints error on rest.
SunOS 5.11 12 Aug 2004 pmconfig(1M)