Set Command Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Set Command Help
# 1  
Old 03-09-2009
Set Command Help

Hi,

I have following scenario..

set -e

eval Command 1
eval Command 2
eval Command 3

gmake realclean

but now the problem is I want to print an error message, advising user to run gmake realclean after resolving errors if any of the Command1/2/3 failed. I know I can use trap to do that but somehow its not advisable as Command1/2/3 returns range of exit codes which I cant keep a track of.

Thanks in advance,

Shri
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

2. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

3. HP-UX

What is the use of command set -- and set - variable?

Hi, I am using hp unix i want to know the use of the following commands set -- set - variable thanks (4 Replies)
Discussion started by: gomathi
4 Replies

4. UNIX for Dummies Questions & Answers

When do we use set command

Hi all, Some clarification regarding the unix set command for ksh env. I read up the man pages, but ended up more blur. Eg. - Turns off -x and -v flags and stops examining argu- ments for flags. - Does not change any of the flags. This option is ... (1 Reply)
Discussion started by: srage
1 Replies

5. Shell Programming and Scripting

set -x command

hi all, Please tell all the uses of set -x command. Also can you tell about other options which can be used with set command. Thanks:) sumit (3 Replies)
Discussion started by: sumit207
3 Replies

6. UNIX for Dummies Questions & Answers

What is the set -o vi command for?

I have heard the following command and seen people using it at shell but I don't know what it is for and when it is used. I will appreciate any comment regarding the use of this command. set -o vi (2 Replies)
Discussion started by: agasamapetilon
2 Replies

7. Shell Programming and Scripting

set command

Hi, I am new to unix and trying to learn shell scripting. I am using Redhat linux instead of unix and using Bash shell. I typed some code which consist of "set" command. I got the code from a book. The code is, set 'who am i' echo $name Actually the... (3 Replies)
Discussion started by: saravanakumar
3 Replies

8. Shell Programming and Scripting

how to use set command

i have a script in which i go to a particular dir and list all its file ------------------------------------------------------------------------ #!/bin/ksh if test -d systemProperties then set --`cd systemProperties` for i in * do echo "$i" >> lastm2.txt done fi... (2 Replies)
Discussion started by: ali560045
2 Replies

9. Shell Programming and Scripting

command set

Hello I'm using command "set" to count number of word in file . But I don't know how to get number of lines in file using commnad "set " ?. Please Help. #!/bin/sh set -- `cat $1` echo " $# words " # wc -w $1 (4 Replies)
Discussion started by: scotty_123
4 Replies

10. UNIX for Dummies Questions & Answers

SET command

Hi Unixers, :) In a shell script i found the following statements mline='grep\^ 1111 emaster.dbf set -- $mline The first statement searches the emaster.dbf file for the code 1111 and ifit finds any such line it gets that line and stores it in mline. But iam getting little bit confusion with... (4 Replies)
Discussion started by: ravi raj kumar
4 Replies
Login or Register to Ask a Question
Mojolicious::Commands(3pm)				User Contributed Perl Documentation				Mojolicious::Commands(3pm)

NAME
Mojolicious::Commands - Command line interface SYNOPSIS
use Mojolicious::Commands; # Command line interface my $commands = Mojolicious::Commands->new; $commands->run(@ARGV); DESCRIPTION
Mojolicious::Commands is the interactive command line interface to the Mojolicious framework. It will automatically detect available commands in the "Mojolicious::Command" namespace. COMMANDS
These commands are available by default. "help" $ mojo $ mojo help $ ./myapp.pl help List available commands with short descriptions. $ mojo help <command> $ ./myapp.pl help <command> List available options for the command with short descriptions. "cgi" $ ./myapp.pl cgi Start application with CGI backend. "cpanify" $ mojo cpanify -u sri -p secr3t Mojolicious-Plugin-Fun-0.1.tar.gz Upload files to CPAN. "daemon" $ ./myapp.pl daemon Start application with standalone HTTP 1.1 server backend. "eval" $ ./myapp.pl eval 'say app->home' Run code against application. "generate" $ mojo generate $ mojo generate help $ ./myapp.pl generate help List available generator commands with short descriptions. $ mojo generate help <generator> $ ./myapp.pl generate help <generator> List available options for generator command with short descriptions. "generate app" $ mojo generate app <AppName> Generate application directory structure for a fully functional Mojolicious application. "generate lite_app" $ mojo generate lite_app Generate a fully functional Mojolicious::Lite application. "generate makefile" $ mojo generate makefile $ ./myapp.pl generate makefile Generate "Makefile.PL" file for application. "generate plugin" $ mojo generate plugin <PluginName> Generate directory structure for a fully functional Mojolicious plugin. "get" $ mojo get http://mojolicio.us $ ./myapp.pl get /foo Perform requests to remote host or local application. "inflate" $ ./myapp.pl inflate Turn templates and static files embedded in the "DATA" sections of your application into real files. "psgi" $ ./myapp.pl psgi Start application with PSGI backend. "routes" $ ./myapp.pl routes List application routes. "test" $ mojo test $ ./myapp.pl test $ ./myapp.pl test t/fun.t Runs application tests from the "t" directory. "version" $ mojo version $ ./myapp.pl version Show version information for installed core and optional modules, very useful for debugging. ATTRIBUTES
Mojolicious::Commands inherits all attributes from Mojo::Command and implements the following new ones. "hint" my $hint = $commands->hint; $commands = $commands->hint('Foo!'); Short hint shown after listing available commands. "message" my $message = $commands->message; $commands = $commands->message('Hello World!'); Short usage message shown before listing available commands. "namespaces" my $namespaces = $commands->namespaces; $commands = $commands->namespaces(['Mojolicious::Commands']); Namespaces to load commands from, defaults to "Mojolicious::Command" and "Mojo::Command". # Add another namespace to load commands from push @{$commands->namespaces}, 'MyApp::Command'; METHODS
Mojolicious::Commands inherits all methods from Mojo::Command and implements the following new ones. "detect" my $env = $commands->detect; my $env = $commands->detect($guess); Try to detect environment. "run" $commands->run; $commands->run(@ARGV); Load and run commands. Automatic deployment environment detection can be disabled with the "MOJO_NO_DETECT" environment variable. "start" Mojolicious::Commands->start; Mojolicious::Commands->start(@ARGV); Start the command line interface. # Always start daemon and ignore @ARGV Mojolicious::Commands->start('daemon', '-l', 'http://*:8080'); "start_app" Mojolicious::Commands->start_app('MyApp'); Mojolicious::Commands->start_app(MyApp => @ARGV); Load application and start the command line interface for it. # Always start daemon for application and ignore @ARGV Mojolicious::Commands->start_app('MyApp', 'daemon', '-l', 'http://*:8080'); SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojolicious::Commands(3pm)