10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to figure out why I am having a "problem" with some functions in a bash script I am running. The reason for air quoting is that the functions are working, they are just not displaying anything to screen when called from another function. Here's an example:
function Create_Input
{... (6 Replies)
Discussion started by: dagamier
6 Replies
2. Shell Programming and Scripting
hey guys, im trying to learn bourne shell atm and I'm having some issues with functions.
so heres my code:
#!/bin/bash
##functions
memory () {
free -m
}
space () {
df -h
}
ip () { (5 Replies)
Discussion started by: hawkfro12
5 Replies
3. Solaris
I noticed we have a small splice on end of disk that is not mounted. What could that be and how do we move it few sectors?
Thanks. (7 Replies)
Discussion started by: orange47
7 Replies
4. Shell Programming and Scripting
I created two functions that output two random variables. I want to output them in the output file. But it does not seem to work.
# Function rgaussian1(r1, r2)
# Gaussian random number generator
function rgaussian1(r1, r2) {
pi = 3.142
v1 = sqrt( -2 * log(rand()) )
v2... (18 Replies)
Discussion started by: kristinu
18 Replies
5. Shell Programming and Scripting
Hi,
I had a scripts which calls two function. One function will call another function, script is working fine but the second function is not calling the first function. Below is the script
#!/usr/bin/ksh
fun1() {
echo $DATETIME >> Test1.ksh
return 0
}
fun2() {
typeset DATETIME=`date... (5 Replies)
Discussion started by: somu_june
5 Replies
6. Shell Programming and Scripting
Hi All,
What is the problem with the following script:
function mmdd
{
dd=$2
case $1 in
"Jan") mm=01;;
"Feb") mm=02;;
"Mar") mm=03;;
"Apr") mm=04;;
"May") mm=05;;
"Jun") mm=06;;
"Jul") mm=07;;
"Aug") mm=08;;
"Sep") mm=09;;
"Oct") mm=10;;
"Nov") mm=11;;
"Dec") mm=12;;
*)... (3 Replies)
Discussion started by: Hiso
3 Replies
7. Shell Programming and Scripting
Hi all,
I have to move all the files in a tree directory structure to a single directory. Inorder to know which file is from which directory , i'll have to add the name of the directory to the file name. For this i wrote a recursive function which is as follows... (4 Replies)
Discussion started by: malle
4 Replies
8. Shell Programming and Scripting
I have perl script as follow.
------------------------------------------------------------------------
#! /usr/bin/env perl
use strict;
sub printLines
{
print "Inside the function.............\n";
my (@file , $count , $key ) = $_;
print $count , $ key ; #... (2 Replies)
Discussion started by: avadhani
2 Replies
9. Programming
Hello,
How to execute a call back function after aio_write() or aio_read() in Sun Solaris 5.7?
I have filled the control block struct aiocb as follows:
aio_sigevent.sigev_signo = SIGEV
aio_sigevent.sigev_notify = SIGEV_THREAD
Then I have filled the call back function in ... (0 Replies)
Discussion started by: hmurali
0 Replies
10. Programming
Hi folks,
I'm trying to make a reconnection algorithm using rexec(), but I noticed that when rexec() fails returning -1, it is impossible to make it run successfully again until you restart the program or the thread.
Example, I have a endless loop for connection retries, if I supply a wrong... (7 Replies)
Discussion started by: lcmoreno
7 Replies