hi friends,
i'm new to unix and straight away i had to start with the script files.
I've a script file which gets called from a menu item on a GUI.
This script file again calls .awk file, in performing some tasks , which also generates certain files.
I modified the files to generate some... (1 Reply)
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)
Hi all,
In a shell script I need to pass two parameters to a pl/sql script and get the ouput of the pl/sql script and use it in shell script.
For example
Shell script : test.sh
PL/SQL script : get_id.sql parameter1 parameter2
Actually get_id.sql has a select statement something... (1 Reply)
Hello Friends,
I have bash script on unix server which i want to call from windows server. Basically i want a command line which will call this script on unix server. Any one has any idea regarding this?
Help really appreciated!!
Thanks,
Roshni. (1 Reply)
Hi,
I have a query ..
i have 2 scripts say 1.sh and 2.sh
1.sh contains many functions written using shell scripts.
2.sh is a script which needs to call the functions definded in 1.sh
function calls are with arguments.
Can some one tell me how to call the functions from 2.sh?
Thanks in... (6 Replies)
All:
I am calling a PERL script from KSH. I need specific codes to be returned by the PERL Script.
For ex:
Ksh
-----
result=`test.pl $FILE`
My idea is to get the value of result from the test.pl, by specifically making the test.pl to print the return code. Since I had some other print... (1 Reply)
Hi there,
I have an script reading content of a file and runs whatever command is specified there, as follows
#!/bin/bash
# Supposed to read from a file that commands are listed to be run
# when the server starts for initialization
CMD_FILE=/myScripts/startup/task2do.txt
if ; then
... (2 Replies)
Hi all,
I have two ksh scripts
#sample1.sh
#!/bin/ksh
. ./sample2.sh
echo $fileExist
#sample2.sh
#!/bin/ksh
func()
{
i=1
return $a
}
func
echo $?
Here how should I return the value of sample2.sh back to sample1.sh?
Thanks in advance. (2 Replies)
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
How could I call an Oracle PL/SQL procedure from any shell (bash) and catch returning value from that procedure (out param) or get a returning value if it's a function.
also, I got into trouble when I tried to send a number as a param
#!/bin/bash -e
username=$1
pwd=$2
baza=$3... (0 Replies)
Discussion started by: bongo
0 Replies
LEARN ABOUT SUSE
fvwm-themes-com
FVWM-THEMES-COM(1) Fvwm Utility FVWM-THEMES-COM(1)NAME
fvwm-themes-com - fvwm-themes communication center
SYNOPSIS
fvwm-themes-com [ --help] [ --version] [ --name name ] [ --message message ] [ --lock-and-get ] [ --get-buffer ] [ --clear-buffer ] [
--buffer-name name ] [ --line lineNbr]
DESCRIPTION
This script is not a user script. It is used by Fvwm-Themes for communication between some FvwmScript scripts and some other programs.
Basically, you want to start a programs in the background which support the fvwm-themes-com communication protocol (e.g., fvwm-themes-menu-
app and fvwm-themes-config with the com-mode option can be used as generic examples), then you can use fvwm-themes-com to ask questions or
to give instructions to the background program. The answer are displayed by fvwm-themes-com in the standard out put and can be used by a
FvwmScript script via the GetoutPut instruction. The advantage of using this method is that the background program have to do its main job
only once (e.g., parsing a lot of informations and storing them in some variables) and a script can have very fast answer from the back-
ground program via fvwm-themes-com.
OPTIONS --help - show the help and exit
--version - show the version and exit
--name name - the name of the communication (e.g., if you start fvwm-themes-menuapp with --com-name pid option you must use menuapp-pid as
name to communicate with it). The pipe used for communication are $FVWM_DATADIR/{.tmp-com-in-name,tmp-com-out-name,tmp-com-lock-name}. The
"buffer" file is $FVWM_USERDIR/.tmp-com-buffer-name
--message - A one line message to be sent to the back program.
--lock-and-get - Wait (a certain "time out") for an answer of the message. Then, the answer is displayed on STDOUT.
--line n - n must be an integer n > 0. In the case of a lock and get message, fvwm-themes-com will out put only the nth line of the answer
of the back program on STDOUT and will copy the complete answer in a "buffer" file. If you use the get-buffer option the nth line of the
buffer is out put on STDOUT.
--get-buffer - Out put the buffer file on STDOUT.
--buffer-name othername - Use an alternative name for the buffer file: $FVWM_USERDIR/.tmp-com-buffer-othername. This is usefull if two pro-
grams use the same background program and both use the buffer.
--clear-buffer - remove the buffer file.
USAGE
Here an example:
In the Script FvwmScript-Menus you first start the background program, here fvwm-themes-menuapp, and you set some variables for an easy use
of fvwm-themes-com:
# found the FvwmScript pid
Set $CMD = {perl -e '$t=getppid; print $t . "
"'}
Set $PID = (GetOutput $CMD 1 -1)
# Run fvwm-themes-menuapp until the end of the script
Do {Exec fvwm-themes-menuapp --com-mode --com-name=menuapp-}$PID{ &}
# to send fvwm-themes-com command
Set $SendMsgAndGet = {fvwm-themes-com --name menuapp-}$PID{ --lock-and-get --message=}
Set $SendMsg = {fvwm-themes-com --name menuapp-}$PID{ --message=}
Set $GetLine = {fvwm-themes-com --name menuapp-}$PID{ --get-buffer --line=}
Then in the Script you can ask fvwm-themes-menuapp for some informations:
# Get the menu list
Set $CMD = $SendMsgAndGet{"menu-items }$MENU{"}
Set $ItemsList = (GetOutput $CMD 1 -1)
ChangeTitle 11 $ItemsList
You can also just send an instruction to fvwm-themes-menuapp:
Set $CMD = $SendMsg{"exit"}
Do {Exec }$CMD
Of course your back program have to support the fvwm-themes-com protocol. See fvwm-themes-menuapp and fvwm-themes-config for examples (com-
mode option). See also FvwmScript-Menus and FvwmScript-ThemesCenter.
AUTHORS
Olivier Chapuis <olivier.chapuis@free.fr>, 5 May 2000.
COPYING
The script is distributed by the same terms as fvwm itself. See GNU General Public License for details.
BUGS
Report bugs to fvwm-themes-devel@lists.sourceforge.net
3rd Berkeley Distribution perl v5.6.0 FVWM-THEMES-COM(1)