03-18-2010
how to make some condition when program/tool unsuccesfully ends with error..
Simply, when i have tool "pdftotext", "sed" or "wget" and if this tool make an error in converting or downloading or something, I want to terminate my script...something like:
if [ pdftotext throws error/exception ]; then
exit 1
fi
bud I dont know how..can you help guys?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
whitout using awk / sad and so on? (3 Replies)
Discussion started by: umen
3 Replies
2. AIX
Hi,
Does anyone has installed bb on a unix system ? I am trying to install bb on aix 5.3 but I have the following message: If someone can help me probably there is a tool that I need to install ? I don't have C compiler I install gcc instead and gcc++ etc ...
bb:/home/bb/bb1.9g-btf/src/ $ make... (0 Replies)
Discussion started by: touny
0 Replies
3. Programming
Hi, so far i am writting make file explicitly, is there is any tool is there to write make file automatically....if so please tell me about that...
Thanks in advance
Sarwan (4 Replies)
Discussion started by: sarwan
4 Replies
4. Linux
Hi All,
I am very curious to know that how to make a product/tool as evalution copy(trail version for 30days).
I want to know this implemention process in linux(the tool is in Linux).
If anybody have any scripts/articles/ideas please pass them to me.
Please help me.
Thanks in Advace,... (0 Replies)
Discussion started by: uday123
0 Replies
5. Shell Programming and Scripting
Hi all, i hope i got this in the right place, what i am trying to do is make a program only run by root, ie
for instance user fred is logged in and uses firefox, what id like to do is change that so that when fred wants to use firefox he will be asked to enter root password before he is allowed to... (14 Replies)
Discussion started by: dave123
14 Replies
6. UNIX for Dummies Questions & Answers
In unix how we can test or check race condition in any c program by using multi thread programming (1 Reply)
Discussion started by: afroze
1 Replies
7. Programming
In unix how we can test or check race condition in any c program by using multi thread programming (5 Replies)
Discussion started by: afroze
5 Replies
8. Programming
Hi,
I'm trying to create a C program that functions like the make utility in UNIX for personal use. My program would read in from a generic makefile and execute whatever is in that makefile but I'm not sure as to where I should start coding.
I would appreciate any help.
Thanks. (1 Reply)
Discussion started by: kratos.
1 Replies
9. Solaris
I attached a README file that I will refer to.
I successfully completed everything in the README file until step 4.
# pwd
/gani/gani-2.4.4
# ls
COPYING Makefile.macros gem.c
Makefile Makefile.sparc_gcc gem.h
Makefile.amd64_gcc ... (1 Reply)
Discussion started by: Bradj47
1 Replies
10. Shell Programming and Scripting
Hi,
I am writing a menu driven program using shell script. THe script will be collecting data by logging into the other servers and bringing back the data to home server to process it and accordingly issue commands. TO automate commands execution , I am using expect script. However I am not able... (5 Replies)
Discussion started by: ashima jain
5 Replies
LEARN ABOUT CENTOS
git-mergetool
GIT-MERGETOOL(1) Git Manual GIT-MERGETOOL(1)
NAME
git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
SYNOPSIS
git mergetool [--tool=<tool>] [-y | --[no-]prompt] [<file>...]
DESCRIPTION
Use git mergetool to run one of several merge utilities to resolve merge conflicts. It is typically run after git merge.
If one or more <file> parameters are given, the merge tool program will be run to resolve differences on each file (skipping those without
conflicts). Specifying a directory will include all unresolved files in that path. If no <file> names are specified, git mergetool will run
the merge tool program on every file with merge conflicts.
OPTIONS
-t <tool>, --tool=<tool>
Use the merge resolution program specified by <tool>. Valid values include emerge, gvimdiff, kdiff3, meld, vimdiff, and tortoisemerge.
Run git mergetool --tool-help for the list of valid <tool> settings.
If a merge resolution program is not specified, git mergetool will use the configuration variable merge.tool. If the configuration
variable merge.tool is not set, git mergetool will pick a suitable default.
You can explicitly provide a full path to the tool by setting the configuration variable mergetool.<tool>.path. For example, you can
configure the absolute path to kdiff3 by setting mergetool.kdiff3.path. Otherwise, git mergetool assumes the tool is available in PATH.
Instead of running one of the known merge tool programs, git mergetool can be customized to run an alternative program by specifying
the command line to invoke in a configuration variable mergetool.<tool>.cmd.
When git mergetool is invoked with this tool (either through the -t or --tool option or the merge.tool configuration variable) the
configured command line will be invoked with $BASE set to the name of a temporary file containing the common base for the merge, if
available; $LOCAL set to the name of a temporary file containing the contents of the file on the current branch; $REMOTE set to the
name of a temporary file containing the contents of the file to be merged, and $MERGED set to the name of the file to which the merge
tool should write the result of the merge resolution.
If the custom merge tool correctly indicates the success of a merge resolution with its exit code, then the configuration variable
mergetool.<tool>.trustExitCode can be set to true. Otherwise, git mergetool will prompt the user to indicate the success of the
resolution after the custom tool has exited.
--tool-help
Print a list of merge tools that may be used with --tool.
-y, --no-prompt
Don't prompt before each invocation of the merge resolution program.
--prompt
Prompt before each invocation of the merge resolution program. This is the default behaviour; the option is provided to override any
configuration settings.
TEMPORARY FILES
git mergetool creates *.orig backup files while resolving merges. These are safe to remove once a file has been merged and its git
mergetool session has completed.
Setting the mergetool.keepBackup configuration variable to false causes git mergetool to automatically remove the backup as files are
successfully merged.
GIT
Part of the git(1) suite
Git 1.8.3.1 06/10/2014 GIT-MERGETOOL(1)