10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
3. 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
4. Shell Programming and Scripting
I have a script which does gunzip, zip and untar.
Input to the script is file name and file directory (where file is located)
I am reading the input parameters as follows:
FILENAME=$1
FILEDIR=$2
I have created 3 functions that are as follows:
1) gunzip file
2) unzip file... (2 Replies)
Discussion started by: pinnacle
2 Replies
5. Boot Loaders
Hello,
I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error
" reboot and select proper Boot device or insert Boot media in select Boot device and press a key "
I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies
6. Shell Programming and Scripting
I have two scripts. script1.sh looks
--------------------------------
#!/bin/bash
display()
{
echo "Welcome to Unix"
}
display
-----------------------------
Script2.sh
#!/bin/bash
sh script1.sh //simply calling script1.sh
------------------------------ (1 Reply)
Discussion started by: mvictorvijayan
1 Replies
7. 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
8. Programming
hello socket programming expert,
I having difficulties in understanding how select() function in socket programming work.... I'm trying to create my own peer-to-peer chat or file transfer program by using the select() function.... Therefore does anyone had any tutorial or source code that... (4 Replies)
Discussion started by: draggy
4 Replies
9. Shell Programming and Scripting
Hi folks,
As we all know, the "select" function give a number to each element as the number of elements in the select.
for example:
I have a program which ask a user to select a language:
===============================================================================
Please select the... (1 Reply)
Discussion started by: nir_s
1 Replies
10. Programming
i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies
select.h(3HEAD) Headers select.h(3HEAD)
NAME
select.h, select - select types
SYNOPSIS
#include <sys/select.h>
DESCRIPTION
The <sys/select.h> header defines the timeval structure, which includes the following members:
time_t tv_sec /* seconds */
suseconds_t tv_usec /* microseconds */
The time_t and suseconds_t types are defined as described in <sys/types.h>. See types.h(3HEAD).
The sigset_t type is defined as described in signal.h(3HEAD).
The timespec structure is defined as described in <time.h>. See time.h(3HEAD).
The <sys/select.h> header defines the fd_set type as a structure.
The following is defined as a macro:
FD_SETSIZE Maximum number of file descriptors in an fd_set structure.
Inclusion of the <sys/select.h> header can make visible all symbols from the headers <signal.h>, <sys/time.h>, and <time.h>.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
select(3C), signal.h(3HEAD), time.h(3HEAD), types.h(3HEAD), attributes(5), standards(5)
SunOS 5.11 10 Sep 2004 select.h(3HEAD)