10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I am still learning awk and much apprecated to shed some light on the following: the questions asked is below!
{
total = i = 0
do {
++i
total += $i
} while ( total <= 100 )
print i, ":", total
}
File used:
cat test.do
45 25 60 20
10 105 50 40
33 5 9 67
108 3 5 4 (2 Replies)
Discussion started by: Apollo
2 Replies
2. Shell Programming and Scripting
Hi all,
I currently have the following problem:
In an awk script, I am calling a predifend function from the END{} and handing over a command string. This string arrives flawless and is executed like this:
function send_msg( cmd_str )
{
... (7 Replies)
Discussion started by: zaxxon
7 Replies
3. UNIX for Advanced & Expert Users
I am more of a newbie, but wanted to post this in this forum as I was afraid no one would look at it in unix forums as it concerns shell scripting. I have a shell script that now runs fine with the exclusion of one line:
x=`su nbadmin -c "ssh -t servery /usr/openv/netbackup/bin/bplist -C... (7 Replies)
Discussion started by: newbie2010
7 Replies
4. UNIX for Dummies Questions & Answers
This may be a dumb question, but googling is not giving me an answer. I'm trying to figure out how to refer to an input file in my code.
Lets say i run a script in bash:
"sh shellscript.sh inputfile"
(Inputfile will be variable...whatever file i run the script on)
I wanted to make... (5 Replies)
Discussion started by: legato22
5 Replies
5. UNIX for Dummies Questions & Answers
Hi there can anyone help me
here is my code
echo "Type in a positive number"
read X
I=2
while
do
if
then
echo "It is not prime"
break
else
if
then
echo "It is prime"
break
else
I=$(( $I + 1))
fi
fi (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies
6. Shell Programming and Scripting
hello. this is the code
#!/bin/sh
total1024=0
total2048=0
total8192=0
if ; then
if ; then
while read variable
do
if ; then
total1024=$(( $total1024 + 1 ))
fi
if ; then
total2048=$((... (4 Replies)
Discussion started by: Telis
4 Replies
7. OS X (Apple)
What I want my script to do is to run a command in Terminal and close that same Terminal window when the process is complete.
Of course I could ad a delay of 6 seconds to complete the process, but it may not be enough every time.
To simplify my question, this is what I want to achieve.... (9 Replies)
Discussion started by: ShadowofLight
9 Replies
8. Shell Programming and Scripting
While calling shell script i need to use prefix . Any idea?
Ex:
myscript.sh -parameter1 "AA;BB" -parameter2 "DD;E" (5 Replies)
Discussion started by: mnjx
5 Replies
9. Solaris
Hi All,
I am having a code written in C++.First I build this code on SUN 5.10.It was built successfully.Following is the log when build was successful.
-L/apps/compilers/SUNWspro/lib -lm -lsunmath \
-o App
ld: warning: symbol `clog' has differing types:
(file... (0 Replies)
Discussion started by: milindb
0 Replies
10. Programming
#include <Xm/Xm.h>
#include <Xm/PushB.h>
Widget CreatePushbutton(Widget parent,
char* name,
XtCallbackProc callback,
XtPointer client_data)
{
Widget push;
Arg args;
Cardinal n;
n=0;
push=XmCreatePushButton(parent,
name, args, n);
XtAddCallback(push,... (4 Replies)
Discussion started by: endeavour1985
4 Replies