04-30-2012
Quote:
Originally Posted by
ThomasMcA
Try using dos2unix to convert your data file, then process it with your script.
Well is that a reason why my echo output would come up blank?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
When i run sh -x test.sh, expr outputs x=expr $x + 1 instead of doing the arithmetic.. been working on this overnight.. and its being a pain in the arse if you ask me.. :confused::confused:
#!/bin/sh
#script for downloading numerical filenames
chap=1
p=1
count=0
x=1
while
do
if ... (2 Replies)
Discussion started by: aspect_p
2 Replies
2. Shell Programming and Scripting
I have information in a file called HITS. This file has been populated by the user entering search criteria.
the HITS file contains information:
filname.hits: 123.33.345.66 Fri Nov 26 11.45.56.43 GMT 2006
at the moment i am just displayin the information using cat HITS.
... (3 Replies)
Discussion started by: amatuer_lee_3
3 Replies
3. UNIX for Dummies Questions & Answers
Hi!
I am a newbie to Unix. I was writing a little game program for fun when thought of an idea to allow data to be saved. I knew to take all of the Predefined variables and put them into a separate file, then including the file in the program. But I am having trouble making it so that the user... (0 Replies)
Discussion started by: signebedi
0 Replies
4. Shell Programming and Scripting
I'm trying to take a list of domains, find out the MX resolve it to IP then find out what the NS is and output the contents to a new file.
The only problem i'm having is when checking the Ip or host of the MX i can only get it to print the column with the MX record and the results of the host... (1 Reply)
Discussion started by: spartan22
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I'm having some trouble with an awk programme that i'm using to scan ascii files.
Unfortunately I'm not an experienced programmer but I think I am experiencing problems for a two reasons:
1) the awk was written by a PC programmer and it works on his machine, but only partly works... (10 Replies)
Discussion started by: Dan Browne
10 Replies
6. Shell Programming and Scripting
Hey there,
I have a table of contents file of the form
1 Title1
1.1 Subtitle1
1.1.1 Subsubtitle1
1.1.2 Subsubtitle2
...
and want to count the number of dots in the first field to find out the level of the section.
I use the gsub function for the job, which works if I pass the pattern... (2 Replies)
Discussion started by: herrsimon
2 Replies
7. Shell Programming and Scripting
Hello I need some help in outputting Fields when the delimiter has changed:
echo "test1,test2 | test3,test4,test5" | awk -F"," '{print $1,"COUNT",$2,$4}'
prints out:
test1 COUNT test2 | test3 test5
But how to change the -F"," to -F"|" delimiter, so that it separates the
fields from $2... (2 Replies)
Discussion started by: sdohn
2 Replies
8. Shell Programming and Scripting
Hello,
Please advise. Scoured this site, as well as google for answers. However if you do not know what to search for, it's a bit hard to find answers.
INPUT:
ACTASS=
802
BASECOS=
279
COSNCHG=
3
CUSCOS=
52
UPLDCOS=
2
DESIRED OUTPUT:
ACTASS=802
BASECOS=279 (13 Replies)
Discussion started by: abacus
13 Replies
9. Shell Programming and Scripting
With this script the output to the terminal does not increment. Can anyone tell me what I need to do to get this to increment output to the terminal?
Here is the output
mpath major,minor number
ls: /dev/mapper/mpathp1: No such file or directory
raw device output
253,44
echo raw device... (5 Replies)
Discussion started by: bash_in_my_head
5 Replies
10. Shell Programming and Scripting
Hello friends,
There is one requirment where I need to login into database environment and pull all schema names into a text file ...
as of now below are the schemas available...
$> describe keyspaces;
system_schema system_auth system abc system_distributed system_traces
Now from... (4 Replies)
Discussion started by: onenessboy
4 Replies
LEARN ABOUT NETBSD
timer_getoverrun
TIMER_SETTIME(2) BSD System Calls Manual TIMER_SETTIME(2)
NAME
timer_settime, timer_gettime, timer_getoverrun -- process timer manipulation
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <time.h>
int
timer_settime(timer_t timerid, int flags, const struct itimerspec * restrict tim, struct itimerspec * restrict otim);
int
timer_gettime(timer_t timerid, struct itimerspec *tim);
int
timer_getoverrun(timer_t timerid);
DESCRIPTION
The timer_settime() sets the next expiration time of the timer with ID timerid to the it_value (see itimerspec(3)) specified in the tim argu-
ment. If the value is 0, the timer is disarmed. If the argument otim is not NULL the old timer settingas are returned.
If the flags argument is set to TIMER_RELTIME then the expiration time is set to the value in nanoseconds specified in the tim argument from
the time the call to timer_settime() was made. If the flags argument is set to TIMER_ABSTIME then the expiration time is set to be equal to
the difference between the clock associated with this timer, and the value specified in the tim argument. If that time has already passed,
then the call succeeds, and the expiration notification occurs.
If the it_interval of the tim argument is non-zero, then the timer reloads upon expiration.
The timer_gettime() function returns the current settings of the timer specified by the timerid argument in the tim argument.
Only one notification event (signal) can be pending for a given timer and process. If a timer expires while the signal is still queued for
delivery, then the overrun counter for that timer is increased. The counter can store values up to DELAYTIMER_MAX. When the signal is
finally delivered to the process, then the timer_getoverrun() function can be used to retrieve the overrun counter for the timer specified in
the timerid argument.
NOTES
Expiration time values are always rounded up to the resolution of the timer, so a notification will never be sent before the requested time.
Values returned in the otim argument of timer_settime() or in the tim argment of timer_gettime() are subject to the above rounding effect and
might not exactly match the requested values by the user.
RETURN VALUES
If successful, the timer_gettime() and timer_settime() functions return 0, and the timer_getoverrun() function returns the expiration overrun
count for the specified timer. Otherwise, the functions return -1, and set errno to indicate the error.
ERRORS
The timer_gettime(), timer_getoverrun(), and timer_settime() functions will fail if:
[EINVAL] The argument timerid does not correspond to a valid timer id as returned by timer_create() or that timer id has been
deleted by timer_delete().
The timer_settime() function will fail if:
[EINVAL] A nanosecond field in the tim structure specified a value less than zero or greater than or equal to 10e9.
SEE ALSO
clock_gettime(2), timer_create(2), timer_delete(2)
STANDARDS
IEEE Std 1003.1b-1993 (``POSIX.1''), IEEE Std 1003.1i-1995 (``POSIX.1'')
BSD
May 17, 2010 BSD