Search Results

Search: Posts Made By: marcus121
Forum: Programming 06-05-2009
19,910
Posted By marcus121
__read_nocancel Function Causes Infinite Loop
Does anyone know what __read_nocancel does and why it would go into an infinite loop?

What I have gathered in my searches is that it pertains to server code. Yet, I'm not running this application...
Forum: Programming 06-05-2009
3,865
Posted By marcus121
Thanks Folks
Apparently I do not have truss available to me.

/home/mal> man truss
No manual entry for truss
/home/mal> which truss
/usr/bin/which: no truss in ( ... )

Additionally, it looks like ulimit...
Forum: Programming 06-05-2009
3,865
Posted By marcus121
Is my code in an Infinite Loop?
Production C code compiled without the dash-g option is running, and seems to be in an infinite loop. Is there a way to tell? Is there a diagnostic tool that will report what objects or what lines...
2,825
Posted By marcus121
Just be careful with this approach. It includes...
Just be careful with this approach. It includes non-word constituents, such as $500 or you might get a number like 159.500.3.24 or something like that.

Of course the down-side to the approach I...
2,825
Posted By marcus121
Quote it with a space, like so: grep " 500 "...
Quote it with a space, like so:

grep " 500 " access

Note: No need to cat into a grep.
13,104
Posted By marcus121
tr ',' ';' <filein | awk -F\; 'BEGIN{OFS=","}...
tr ',' ';' <filein | awk -F\; 'BEGIN{OFS=","} {print $1,$2,$3,$4*100+$5,$6*100+$7}'
26,383
Posted By marcus121
Do you mean files that are exactly 2 months old...
Do you mean files that are exactly 2 months old today?

rm *.20090201
2,694
Posted By marcus121
./myscript | awk '{ .... }'
./myscript | awk '{ .... }'
2,523
Posted By marcus121
Wow, I love it! Thanks cfa. All these years...
Wow, I love it! Thanks cfa. All these years I've been doing:

for arg;do
stype=$(echo $arg|cut -b-3)
echo $stype
done
2,646
Posted By marcus121
dash-v, e.g.: grep -v foobar would...
dash-v, e.g.:

grep -v foobar

would display all lines except those which contain "foobar" in it.
~Marcus
Forum: AIX 04-01-2009
23,389
Posted By marcus121
Thanks wempy. I missed the part about it only...
Thanks wempy. I missed the part about it only working with bourne/bourne-again in the initial post. Thanks.
13,104
Posted By marcus121
Regarding the rest of your question, if it's...
Regarding the rest of your question, if it's always the case that you wish the commas were semi-colons in your new file, you could translate prior to your awk:
tr ',' ';' <csvfile | awk -F\; '{ ......
13,104
Posted By marcus121
Yes, %i (and %d) are numeric. %s is character...
Yes, %i (and %d) are numeric. %s is character string (whereas %c is a single character).

What this is doing is inputing the csv file (separated by comma) and outputting all but the last field...
Forum: AIX 04-01-2009
23,389
Posted By marcus121
ksh. This works fine on the command line: ...
ksh.
This works fine on the command line:

$ D='$PWD'
$ PS1="$(hostname -s):$D> "
strawboss:/home/mlibby> cd /msa1/profiles/mlibby/ksh
strawboss:/msa1/profiles/mlibby/ksh>


The problem I'm...
12,512
Posted By marcus121
As Jim said, scp (secure copy). It functions...
As Jim said, scp (secure copy). It functions much the same as copy and even has the "preserve" option (dash-p) so the transfered files maintain their original date/time stamp, permissions, etc.
...
2,416
Posted By marcus121
ls *.fits | grep -v "Zero\|zero" > objlist ...
ls *.fits | grep -v "Zero\|zero" > objlist


List files in the current directory that end in .fits and DO NOT CONTAIN (i.e., -v) the word Zero or zero (case sensative), and write the results to...
Forum: AIX 04-01-2009
23,389
Posted By marcus121
Yes, I'm familiar with doing it that way. I was...
Yes, I'm familiar with doing it that way. I was intrigued by the control character construct (e.g., \h \w etc.) and wanted to see that work. That is what I was having trouble with.

I did it on...
6,401
Posted By marcus121
Orestis, that is why I mentioned you should look...
Orestis, that is why I mentioned you should look at the man pages for find, as I don't know exactly what your requirements are. And I think I said here is an example "roughly" what I think you may...
Forum: AIX 04-01-2009
23,389
Posted By marcus121
Not working for me
I entered the following, expecting to get "hostname:/current/path> " as a prompt (based on your post), but look what happened:


/msa1/agility/devel/bin> PS1="\h:\w> "
h:w> uname -s
Linux
h:w>...
Forum: Programming 04-01-2009
3,949
Posted By marcus121
Hi Corona. Thanks for your feedback. We tried...
Hi Corona. Thanks for your feedback. We tried LD but it really lacked intelligence for our purposes. For example, the numbers 2401 and 24 it reported as being 50% alike. Clearly by human eye you...
6,401
Posted By marcus121
Look at the man pages for "find" command. ...
Look at the man pages for "find" command. Roughly what you're looking for:

#!/bin/bash
find $HOME -daystart -ctime 0 -type f >files_today.list # files modified today
find $HOME -daystart...
Forum: AIX 03-31-2009
23,389
Posted By marcus121
Followup: If your hostname is fully qualified...
Followup: If your hostname is fully qualified (e.g. node.coname.com) you can do the following to just get node:
PS1="$(hostname|awk -F. '{print $1}'):/#>"

Also, if you want the current path as...
Forum: AIX 03-31-2009
23,389
Posted By marcus121
As illustrated above with the...
As illustrated above with the colon-slash-hash-greaterthan, like so:

PS1="$(hostname):/#>"
1,243
Posted By marcus121
$Filename isn't known within awk. You could do...
$Filename isn't known within awk. You could do this:
awk 'NR == 1 || substr($0,63,5) ~ /H... / && \
_++ == 1 { fn && close(fn); fn = Z "_" ++c; _ = 1 }
{ print > fn }' Z=$Filename $Filename
Forum: Programming 03-31-2009
3,949
Posted By marcus121
Fuzzy Match Logic for Numerical Values
I have searched the internet (including these forums) and perhaps I'm not using the right wording.

What I'm looking for is a function (preferably C) that analyzes the similitude of two numerical...
Showing results 1 to 25 of 34

 
All times are GMT -4. The time now is 09:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy