could somebody tell me please how to exit a shell script:
if
then
echo "No arguments detected"
exit 1
fi
...
echo "still there" # is displayed .. :-( (4 Replies)
I have a java classpath running inside of a unix shell script. During my testing it will error with lines that show an example like this below.
java.io.FileNotFoundException error
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:129),
... (2 Replies)
i am writing a script to perform some mysqldumps and gzip them. The problem I am running into is that if the user specifies a database that doesn't exist, the error the mysql engine produces is still piped into gzip, and the exit code returned is 0. If I don't pipe into gzip, an exit code... (4 Replies)
hi guys
I have a script that I need to terminate or exit the shell or session completely for the user but the exit only exit from the script and takes the user to the shell
I found this
https://www.unix.com/unix-dummies-questions-answers/399-using-exit-command-shell-script.html
saying that... (1 Reply)
Hi,
Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds?
The scenarios is like this.
I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not... (10 Replies)
hi,
i want to pop up an alert box using perl script. my requirement is.
i am using a html page which calls a perl script. this perl script calls a shell script.. after the shell script ends its execution, i am using exit 0 to terminate the shell script successfully and exit 1 to terminate the... (3 Replies)
Hi,
suppose my script is sample.sh
i have to run using '. ./sample.sh'
as . ./script file always executes the script in my parent shell.
when my sample.sh contains exit command .. my environment is getting closed as am executing in the parent shell ...
please suggest me how can i use... (5 Replies)
We have a batch Unix process that runs during the day and it is getting an exit code 11 from Unix. It finishes a sqlplus step and gets the exit code 11 before it starts the next step. This used to happen once a year and now is happening more often (but not every time the process runs). We have... (2 Replies)
Hi,
We have a problem in Linux (GNU/Linux 3.10.0-693.1.1.el7.x86_64) with a shell script returning 267 as return code. The script, load_flag.sh is called from main_script.sh (both script samples given below). The exit code from load_flag.sh is used to decide whether to continue execution of... (1 Reply)
Discussion started by: Arunnath
1 Replies
LEARN ABOUT DEBIAN
gather_stx_titles
gather_stx_titles(1) General Commands Manual gather_stx_titles(1)NAME
gather_stx_titles - gather title declarations from Stx documents
SYNOPSIS
gather_stx_titles [ -f from-suffix ] [ -t to-suffix ] [ m4 options ] file [ file ... ]
DESCRIPTION
gather_stx_titles digs out Stx metadata declarations from the listed files, and dumps the title and document ID information as m4 defini-
tions into standard output. This information can later be used by w_crosslink to link the documents by their metadata.
Why is this useful? Well, imagine that you have a large site with a lot of cross-linking. A document's name will appear in many places:
in the link menu (if you have one), and in the body of different pages where it is cross-linked from. gather_stx_titles lets you put all
the information in one place and where it belongs, i.e. the file itself. You'll be glad if you did, when the time comes to change document
titles or move the documents around; especially so if your website has multilingual magic.
OPTIONS
gather_stx_titles uses m4 internally and will accept any option m4 accepts. In addition to those, it takes the following options:
-f from-suffix
In the filename data, substitute away the suffix from-suffix. Actually, from_suffix may be a regular expression; stupid but
true, in GNU m4 it is a "traditional" regexp, whereas in BSD m4 it is an "extended" regexp. Default to no suffix (nothing to
take away).
-t to-suffix
In the filename data, substitute the suffix taken away by from-suffix with to-suffix. If from-suffix is nil (the default),
append to-suffix to all filenames.
-p prefix
Strip away the prefix given by (regular expression) prefix from filenames. The equivalent of -t for this does not exist, because
you can specify a directory prefix to w_crosslink by w_base.
--version, -V
Just show version information and exit.
--help, -?
Just show a short help message and exit.
EXAMPLES
I guess most of the time you will want to automate the use of gather_stx_titles, for example with a Makefile like this:
SOURCES = $(wildcard *.stx)
TARGETS = $(SOURCES:.stx=.html)
all: $(TARGETS)
titles.m4: $(SOURCES)
gather_stx_titles -f stx -t html $^ > $@
%.html: %.stx titles.m4
stx2any -T html titles.m4 $< > $@
If you don't want to be quite so correct, drop the .html dependency on titles.m4 or titles.m4 dependency on SOURCES. Using temporary files
is not necessary: this should also work:
$ gather_stx_titles *.stx | stx2any - mydoc.stx
SEE ALSO
stx2any (1).
AUTHOR
This page is written by Panu A. Kalliokoski.
Panu A. Kalliokoskigather_stx_titles(1)