Hello
Okay, for reasons related to sourcing a script from another script, I've had to put my main loop into a function, and from there I call other functions. My problem then is exiting from deep within the function call stack.
I used to simply call exit, and that would accomplish what I... (1 Reply)
Hi,
I am running a bash shell script for some simple web server CGI, the script runs as expected from the browser except the following:
curl --silent --max-time 10 --output /dev/null --write-out %{http_code} http://server:port/filename
This line outputs 404 when i execute the script... (0 Replies)
Folks,
Below is a basic synopsis of the problem. I have a script that I need to check for some env vars and fail (exit the script) if they are not there. At the same time I need to set some default env vars. To do this I must run the script from the parent shell or source the script. Doing... (3 Replies)
Solved Stupidly I didn't put brackets around the , thanks for all the help guys
if ps ax | grep Cluster__check.bash | grep -v grep > /dev/null -- fails
(if ps ax | grep Cluster__check.bash | grep -v grep > /dev/null) --works (3 Replies)
Here is my daily stupid question:
How can I tell a script to only execute if the other scripts exits successfully?
So "script A" executes and it executes successfully (0),then "script B" will run
or else
"script A "executes and it exits unsucessfully (1) then "script B" will read return... (6 Replies)
Hi there,
following code snippet should output nothing, IMHO. But the result is "THE END".
#!/bin/bash
if true ; thenexit
fi | grep "somesearchstring"
echo "THE END"using bash 4.1.9(1)
Bug or feature?
Hagen (5 Replies)
I have a script with a whole lot of different functions and want to set teh script so that at any point a key or series of keys can be pressed to exit out and into the main menu function. Rather this than endlessly creating, 'Return to main' menus.
Something along the lines of Ctrl+q for example... (1 Reply)
I'm writing a bunch of scripts to automatically configure Ubuntu and I want to run the code below to remove the white dots from the login screen:
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-grid false
The problem is that... (3 Replies)
Hello,
I have a newly kickstarted RHEL 6.4 server that I'm trying to set-up as a kickstart server. I have done this before on other machines, but I am encountering some strange behaviour in this one.
# service nfs status
rpc.svcgssd is stopped
rpc.mountd is stopped
nfsd is stopped... (0 Replies)
How to return a exit code from a function and use it in conditional?
I tried the following but it does not seem to work.
tests.sh:
if test ./load.sh ; then
echo "0"
else
echo "1"
fi
load.sh:
return 1;
from command line:
$ ./tests.sh
0
I was expecting it to output "1"... (17 Replies)
Discussion started by: wolfv
17 Replies
LEARN ABOUT LINUX
l2ping
L2PING(8) Linux System Administration L2PING(8)NAME
l2ping - Send L2CAP echo request and receive answer
SYNOPSIS
l2ping [-i <hciX>] [-s size] [-c count] [-t timeout] [-d delay] [-f] [-r] [-v] bd_addr
DESCRIPTION
L2ping sends a L2CAP echo request to the Bluetooth MAC address bd_addr given in dotted hex notation.
OPTIONS -i <hciX>
The command is applied to device hciX , which must be the name of an installed Bluetooth device (X = 0, 1, 2, ...) If not speci-
fied, the command will be sent to the first available Bluetooth device.
-s size
The size of the data packets to be sent.
-c count
Send count number of packets then exit.
-t timeout
Wait timeout seconds for the response.
-d delay
Wait delay seconds between pings.
-f Kind of flood ping. Use with care! It reduces the delay time between packets to 0.
-r Reverse ping (gnip?). Send echo response instead of echo request.
-v Verify response payload is identical to request payload. It is not required for remote stacks to return the request payload, but
most stacks do (including Bluez).
bd_addr
The Bluetooth MAC address to be pinged in dotted hex notation like 01:02:03:ab:cd:ef or 01:EF:cd:aB:02:03
AUTHORS
Written by Maxim Krasnyansky <maxk@qualcomm.com> and Marcel Holtmann <marcel@holtmann.org>
man page by Nils Faerber <nils@kernelconcepts.de>, Adam Laurie <adam@algroup.co.uk>.
BlueZ Jan 22 2002 L2PING(8)