My original post did not show up properly. I am trying again.
I have a simple tsch script that does some basic arithmetic. The calculated value was not producing the result I was expecting. I wrote a sample script to illustrate the things that I tried.
script output
Total Count:61 Finished:43 Failed:4 61-43-4
22
Total Count:61 Finished:43 Failed:4 61-43-4
14
Total Count:61 Finished:43 Failed:4 61-43-4
22
Total Count:61 Finished:43 Failed:4 61-43-4
14
Last edited by sgualandri; 01-03-2014 at 04:52 PM..
Reason: original text did not show up
Hey everyone,
A coworker of mine has written a csh script that starts with #!/usr/bin/csh -f. It's my understanding that the -f should skip the .cshrc and .login files, but here's the problem: In the script "line" is used, and I happen to have a "line" in my ~/bin. When the script is ran my... (4 Replies)
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Hi all
Just wondering if someone can help me with this. I'm trying to write a script that processes the output of another file and prints only the lines I want from it.
This is only the second script I have written so please bare with me here. I have referred to the literature and some of the... (3 Replies)
Below is my script:
#!/bin/sh
#echo "Please type oracle-lower case please:"
#read X
#if ]
#then
# echo "Sorry that is not oracle, try again"
# exit 1
#else
# echo Thank you
#fi
find / -name oracle 2>/dev/null |
while read line
do
bdf 2>/dev/null |... (6 Replies)
Hello,
Could someone explain how this one is possible:
# @ x = 10 - 11 + 3
# echo $x
-4
I know that writing script using csh is bad idea, but I need to write few lines.
thanks
Vilius (2 Replies)
Hello everyone,
I need some assistance with what I thought would have been a very simple script.
Purpose of Script:
Script will parse through a source file and modify (search/replace) certain patterns and output to stdout or a file. Script will utilize a "control file" which will contain... (12 Replies)
I have the following code in a csh script
I want to pass the value of the variable sigmasq to the awk script so that I can divide $0 by the value of sigmasq
grep "Rms Value" $f.log \
| awk '{ sub(/*:*\.*/,x); \
print... (2 Replies)
Hi,
Can anyone explain why do I see same request twice in tcpdump package when I use "tcpdump -i any"?
So I'm tracing packets on eth1.800 interface, but using "tcpdump -i any" to capture them. What I see is that the requests/responses from my side seem to appear as duplicate in the pcap file,... (1 Reply)
Hey guys, awk is putting out too many results, two of each specifically. See below.
Code:
read CPU_VENDOR_ID <<< $(cat /proc/cpuinfo | grep "vendor_id" | awk -F: '{print $2}')
echo $CPU_VENDOR_ID
echo
Output:
AuthenticAMD AuthenticAMD
I only want it to print out "AuthenticAMD" once.
... (7 Replies)
Hi,
I have a text file with some thousands of rows of the following kind (this will be referred to as the inputFileWithColorsAndNumbers.txt):
Blue 6
Red 4
Blue 3
Yellow 4
Red 7
Colors in the left column and a number in the right one for each line. I want to run an awk... (5 Replies)
Discussion started by: Zooma
5 Replies
LEARN ABOUT XFREE86
project_walk
project_walk(3PROJECT)project_walk(3PROJECT)NAME
project_walk - visit active project IDs on current system
SYNOPSIS
cc [ flag ... ] file... -lproject [ library ... ]
#include <project.h>
int project_walk(int (*callback)(const projid_t project, void *walk_data), void *init_data);
The project_walk() function provides a mechanism for the application author to examine all active projects on the current system. The
callback function provided by the application is given the ID of an active project at each invocation and can use the walk_data to record
its own state. The callback function should return non-zero if it encounters an error condition or attempts to terminate the walk prema-
turely; otherwise the callback function should return 0.
Upon successful completion, project_walk() returns 0. It returns -1 if the callback function returned a non-zero value or if the walk
encountered an error, in which case errno is set to indicate the error.
The project_walk() function will fail if:
ENOMEM There is insufficient memory available to set up the initial data for the walk.
Other returned error values are presumably caused by the callback function.
Example 1: Count the number of projects available on the system.
The following example counts the number of projects available on the system.
#include <sys/types.h>
#include <project.h>
#include <stdio.h>
typedef struct wdata {
uint_t count;
} wdata_t;
wdata_t total_count;
int
simple_callback(const projid_t p, void *pvt)
{
wdata_t *w = (wdata_t *)pvt;
w->count++;
return(0);
}
...
total_count.count = 0;
errno = 0;
if ((n = project_walk(simple_callback, &total_count)) >= 0)
(void) printf("count = %u
", total_count.count);
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
getprojid(2), libproject(3LIB), settaskid(2), attributes(5)
7 Oct 2003 project_walk(3PROJECT)