07-27-2011
Hey there,
I'm not quite sure about your first question, however to debug a bash shell script the command is thus;
# bash -x <script name>
10 More Discussions You Might Find Interesting
1. Programming
Can someone please tell me how to modify/add to this code so that it recognizes UNIX command options (all beginning with "-") and executes the command with options?
#include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv)
{
int i;
system("stty -echo");
... (8 Replies)
Discussion started by: Safia
8 Replies
2. Shell Programming and Scripting
I am looking to populate an (associated) array with a command line argument.
The command line would look something like this:
alert -action test -priority '10' -module test_module . . .
The associated array would look like this after the data is read in
flag=(action=test
priority=10... (1 Reply)
Discussion started by: jperret
1 Replies
3. Shell Programming and Scripting
my description from another thread...
here's my code:
#!/bin/bash
IFS=$'\n'
function OutputName() {
input=$1
echo $input
input=`echo "$input" | sed -e 's/.//'`
input=`echo "$input".avi`
output_name=$input
}
if ]; then
echo... (5 Replies)
Discussion started by: TinCanFury
5 Replies
4. Shell Programming and Scripting
Hi all,
I want to get options from command line by perl.
usage()
options:
-h Show this help message and exit
-t Name of tester
--timeout Set the timeout
-l ... (1 Reply)
Discussion started by: Damon_Qu
1 Replies
5. Shell Programming and Scripting
Being new to awk I have a really basic question. It just has to be in the archives but it didn't bite me when I went looking for it.
I've written an awk script, placed it in a file, added the "#!/usr/bin/awk -f" at the top of the script and away I go. "% myAwk <inputfile>" gives me exactly what... (2 Replies)
Discussion started by: tomr2k
2 Replies
6. Shell Programming and Scripting
I have the following code and I am calling it using
./raytrac.bash -u
and getting problems. For some reason opt_usage is still 0.
opt_usage=0
iarg=0
narg=$#
while (($iarg < $narg))
do
(( iarg = $iarg + 1 ))
arg=$argv
usrInputFlag=`echo $arg | awk '/=/ {print 1}; ! /=/... (22 Replies)
Discussion started by: kristinu
22 Replies
7. UNIX for Dummies Questions & Answers
Suppose I am a Unix user, not a root.
I can see all commands in running by ps -elf, or some similar commands. Such commands may be submit by other Unix users.
Is there a way that I can display those commands with their full parameters/options. For example, I can see a user is running "ls"... (3 Replies)
Discussion started by: happy_lotus
3 Replies
8. Shell Programming and Scripting
Hi All,
I am new to scripting. Could you please assist me .
Here is my requirement. I have written a script that has 2 option flags defined.
-l) calls some function with the arguments passed in front of -l
-r) calls second function with the arguments passed in front of -r
*) calls the... (7 Replies)
Discussion started by: Jay Deshpande
7 Replies
9. Shell Programming and Scripting
I was just wondering if there is a way to pass an new option or argument to an already running command or program. Let us say you run "zenity --list <options>" and you like to add a title or change the title you used on it while it is already running, is it possible to do that? (1 Reply)
Discussion started by: cryogrid
1 Replies
10. UNIX for Beginners Questions & Answers
Hello Forum,
I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies