01-30-2020
Seems you already have nice descriptions of your functions, from the comments in your code.
What exactly are you looking for. Please be specific.
Thanks
This User Gave Thanks to Neo For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how does below tr command replace nonletters with newlines?
I think I understand tr -cs '\n' part.. but what is
A-Za-z\' <--- what is this??
tr -cs A-Za-z\' '\n' |
-c --complement
-s, --squeeze-repeats
replace each input sequence of a repeated character that is... (0 Replies)
Discussion started by: convenientstore
0 Replies
2. Shell Programming and Scripting
how does below tr command replace nonletters with newlines?
I think I understand tr -cs '\n' part.. but what is
A-Za-z\' <--- what is this??
tr -cs A-Za-z\' '\n' |
-c --complement
-s, --squeeze-repeats
replace each input sequence of a repeated character that is... (1 Reply)
Discussion started by: convenientstore
1 Replies
3. UNIX and Linux Applications
Hi am having a c pgm. It has the include files (unistd.h,sys/types.h,win.h,scr.h,curses.h,stdarg.h and color.h). I don't know the purpose of these include files. will u plz explain me. (1 Reply)
Discussion started by: Mari.kb
1 Replies
4. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
5. UNIX for Dummies Questions & Answers
Its great someone provided this script that strips out a filename and extension but can someone explain how each line works?
file1='Jane Mid Doe.txt'
newfile='Jane.txt'
1) ext=${file1##*.}
2) filename=${file%%.???}
3) set -- $filename
4) newfile="1.$extension" (1 Reply)
Discussion started by: Lillyt
1 Replies
6. Shell Programming and Scripting
I have found a code some where, which looks like
if (test $value)
then
<do something>
fi
I am not understanding what is test doing here. I have seen test with !,-eq, -e etc.
But, the above appears to be a new one to me.
Can anyone please expalin me. (4 Replies)
Discussion started by: mady135
4 Replies
7. UNIX for Dummies Questions & Answers
Hello Unix experts,
If I could get any explanations on why the code below doesn't work it would be great !
My input looks like that ("|" delimited):
Saaaaabbbbbccccc|ok
Sdddddfffffggggg|ok
The goal is, if $2 is "ok", to remove everything before the pattern given in the match function... (5 Replies)
Discussion started by: lucasvs
5 Replies
8. Shell Programming and Scripting
Hi,
I need more explination on it, how it works
abcd="$(echo "$abcd" | sed 's/ //g')" >> ${LOGFILE} 2>&1
can any one suggest me on this?
Rgds,
LKR (1 Reply)
Discussion started by: lakshmanraok
1 Replies
9. Shell Programming and Scripting
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies
10. Shell Programming and Scripting
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT DEBIAN
explain_exit
explain_exit(3) Library Functions Manual explain_exit(3)
NAME
explain_exit - print an explanation of exit status before exiting
SYNOPSIS
#include <libexplain/libexplain.h>
void explain_exit_on_exit(void);
void explain_exit_on_error(void);
void explain_exit_cancel(void);
DESCRIPTION
The explain_exit_on_exit function may be used to have the calling program print an explanation of its exit status (the value passed to
exit(3) or the return value from main) immediately before it terminates.
The explain_exit_on_error function may be used to have the calling program print an explanation of its exit status immediately before it
terminates, if that exit status is not EXIT_SUCCESS.
The explain_exit_cancel function may be used to cancel the effect of the explain_exit_on_exit or explain_exit_on_error function.
These functions may be called multiple times, and in any order. The last called has precedence. The explanation will never be printed
more than once.
Call Exit As Normal
In order to have the explanation printed, simply call exit(3) as normal, or return from main as normal. Do not call any of these functions
in order to exit your program, they are called before you exit your program.
Caveat
This functionality is only available on systems with the on_exit(3) system call. Unfortunately, the atexit(3) system call is not suffi-
ciently capable, as it does not pass the exit status to the registered function.
SEE ALSO
exit(3) cause normal process termination
atexit(3)
register a function to be called at normal process termination
on_exit(3)
register a function to be called at normal process termination
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
AUTHOR
Written by Peter Miller <pmiller@opensource.org.au>
explain_exit(3)