12-18-2012
10 More Discussions You Might Find Interesting
1. Programming
i just finished a project for a c++ class that i wrote at home on my computer, compiled with gcc. when i brought the code into school it would not compile, it would complain that cannot call main() function. at school we use ancient borland c++ from 1995. anyway my program has 20 different... (3 Replies)
Discussion started by: norsk hedensk
3 Replies
2. Shell Programming and Scripting
Ok, I have written a main script which checks a directory contents every 30 secs then sleeps. The subscript does a usermod, if the user is logged on, it sleeps for 30 secs and then trys again over and over again.
Here's the problem. when the subscript is called ./subscript.sh or exec... (1 Reply)
Discussion started by: doublejz
1 Replies
3. Programming
What is the sytax to return an int from C program main back to calling shell?
#!/usr/bin/ksh
typeset -i NO_RECS
$NO_RECS=process_file
# Process file is a C program that is set up to return an int from main. The
#program complies with no issues, but an error is generated when the... (3 Replies)
Discussion started by: flounder
3 Replies
4. Shell Programming and Scripting
Hi,
I have a menu driven script that does various tasks, I want to be able to call functions directly from within other unix scripts from my menu script. Is this possible? (12 Replies)
Discussion started by: LiquidChild
12 Replies
5. Shell Programming and Scripting
Hi,
I have a K shell
a.ksh
function abc {
// Some logic
}
In
b.ksh
i have included the a.ksh
./a.ksh
I want to call the abc function from this b.ksh script.
Thanks
Vijay (2 Replies)
Discussion started by: vijaykrc
2 Replies
6. UNIX for Dummies Questions & Answers
hi everyone ,
i want to read an option and depending on the option call the program .For ex
#! /bin/ksh
export JAVA_HOME=/home/oracle/jdk1.6.0_20
echo " Please enter mod-modeler, dev - sqldeveloper"
read choice
if ; then
echo ' SQL DEVELOPER IS STARTING NOW ... '
cd... (0 Replies)
Discussion started by: kdev
0 Replies
7. Shell Programming and Scripting
I am trying to understand a program in a book and this program suppose to call other programs which are in the same folder, the other programs are called 'lu' and 'add' but for some reason when it gets to the last line of each case to call these programs there is an error message saying
./rolo:... (2 Replies)
Discussion started by: bartsimpsong
2 Replies
8. Shell Programming and Scripting
Greetings,
I m wondering if it's possible do do the following :
I have a simple function called "FindMoveDelete" which does the following :
FindMoveDelete()
{
find . -iname "$FILENAME*.ext" -exec mv {} "$PATH/$VAR" \; &&
find . -maxdepth 1 -type d -iname "$FILENAME*" -exec rm -rf {}... (6 Replies)
Discussion started by: Sekullos
6 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
I need help moving working code into library function called obj13-lib.pl and call the same function in obj13-2.pl
I am a Linux newbie and this certificate is my first step... (0 Replies)
Discussion started by: cllinuxhelp
0 Replies
10. Shell Programming and Scripting
I'm trying to call some functions in the background so that I can multitask in this script. Not working so hot. The functions I call don't ever seem to get called. I'm doing it the exact same way in another script and it's working like a champ so I'm very confused. Here's a pretty simple repro:
... (7 Replies)
Discussion started by: stonkers
7 Replies
LEARN ABOUT MOJAVE
getprogname
GETPROGNAME(3) BSD Library Functions Manual GETPROGNAME(3)
NAME
getprogname, setprogname -- get or set the program name
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
const char *
getprogname(void);
void
setprogname(const char *progname);
DESCRIPTION
The getprogname() and setprogname() functions manipulate the name of the current program. They are used by error-reporting routines to pro-
duce consistent output.
The getprogname() function returns the name of the program. If the name has not been set yet, it will return NULL.
The setprogname() function sets the name of the program to be the last component of the progname argument. Since a pointer to the given
string is kept as the program name, it should not be modified for the rest of the program's lifetime.
In FreeBSD, the name of the program is set by the start-up code that is run before main(); thus, running setprogname() is not necessary.
Programs that desire maximum portability should still call it; on another operating system, these functions may be implemented in a portabil-
ity library. Calling setprogname() allows the aforementioned library to learn the program name without modifications to the start-up code.
SEE ALSO
err(3)
HISTORY
These functions first appeared in NetBSD 1.6, and made their way into FreeBSD 4.4.
BSD
May 1, 2001 BSD