Search Results

Search: Posts Made By: jim mcnamara
Forum: Programming 02-19-2014
6,780
Posted By jim mcnamara
I'm confused. Is there no way to link your...
I'm confused. Is there no way to link your library code on each platform? That way it will always run wherever it is ported to. It is not clear to me if this is what you are asking.

You seem...
Forum: Programming 6 Days Ago
347
Posted By jim mcnamara
The problem relates to memory management. The OS...
The problem relates to memory management. The OS sets an "end point" and a "start point" for a process working set (memory) when the process begins.

There are flavors of the malloc (also realloc)...
365
Posted By jim mcnamara
Your turn next: I got your awk code to run...
Your turn next:
I got your awk code to run against a dummy input file. I cannot see why your sample ran for you - however after fixing syntax I got an awk source file t.awk. t.lis is the file...
545
Posted By jim mcnamara
Plus, bash creates a subprocess (different from...
Plus, bash creates a subprocess (different from ksh) on the right side of a pipe, meaning any changes to variables in the statement on the right are not returned to the parent. This changed with...
Forum: Shell Programming and Scripting 2 Weeks Ago
144
Posted By jim mcnamara
what does ls -l sendmail.cf show? Has it...
what does ls -l sendmail.cf show? Has it changed recently? There should a default version of sendmail.mc you can compile and then substitute. If in doubt.

If it got changed you may want to...
Forum: Shell Programming and Scripting 3 Weeks Ago
979
Posted By jim mcnamara
Use bc if (( $(echo "$num1 > $num2" |bc -l)...
Use bc

if (( $(echo "$num1 > $num2" |bc -l) )); then
echo "ok"
fi


bc does floating point comparisons, in bash you have to surround it with (( )) to get a boolean (true/false) result.
771
Posted By jim mcnamara
Try export run=$1 to make the variable visible...
Try export run=$1 to make the variable visible in child processes. I can't see a mistake in the syntax.
1,429
Posted By jim mcnamara
Paul Hsieh's square root page has a bunch of...
Paul Hsieh's square root page has a bunch of square root algorithms including using Newton's method:

Paul Hsieh's Square Root page (http://www.azillionmonkeys.com/qed/sqroot.html)

I used to...
715
Posted By jim mcnamara
The command connects to a remote server, does and...
The command connects to a remote server, does and ls -l of a directory, which list files in the directory on the remote machine. The command is between the tic characters '

The output of the...
154
Posted By jim mcnamara
So removing "g" would then only replace the first...
So removing "g" would then only replace the first occurrence.
1,027
Posted By jim mcnamara
Corrected version awk -F "[/ \-]" '{ ...
Corrected version
awk -F "[/ \-]" '{
tmp=$(14)
gsub("[A-Z]{2}_[0-9]{4}_", "", tmp)
printf("%s %s-%s\n", $1, tmp, substr( $(15),1,...
1,027
Posted By jim mcnamara
This example is wrong, thanks Rudi See two posts...
This example is wrong, thanks Rudi See two posts down for a revised version, tried to use REGEX to simplify the code, does not accomplish much.
Using the sample
this code
awk -F "[/ \-]" '{
...
1,815
Posted By jim mcnamara
If the file names are the basis of comparison: ...
If the file names are the basis of comparison:

diff -r dir1 dir2 | grep dir1 | awk '{print $4}' > ~/mydiff

diff -r does a recursive comparison of directories and their subdirectories
Forum: What is on Your Mind? 09-07-2019
2,191
Posted By jim mcnamara
Hey! This is great. Welcome to the team. ...
Hey! This is great. Welcome to the team.


- jim
137
Posted By jim mcnamara
Also note that I do not see any difference...
Also note that I do not see any difference between your input and output examples. It is hard to help without an idea of what your tried. It also is extremely helpful for good answers to include...
1,505
Posted By jim mcnamara
By "append" your mean change the subject line - I...
By "append" your mean change the subject line - I think.
Let's tidy up the "script":

# Assume failure
code="FAIL"
# silently check the input file, if okay change the code
grep -q 'Return code...
206
Posted By jim mcnamara
The space character is the concatenation operator...
The space character is the concatenation operator in awk


$ echo "333" | awk '{ $0="space in front " $0 "no space after"; print $0}'
space in front 333no space after
1,033
Posted By jim mcnamara
If you have a process that generates repeated...
If you have a process that generates repeated core dumps, you have a problem. On production systems you want to see no core dumps.

A process that dumps core may leave a data set in an...
1,016
Posted By jim mcnamara
Running find against / (root) is not great idea. ...
Running find against / (root) is not great idea.

Run your code as a non-privleged user.

Try
find / -type f -name '*.sh' -exec grep -l 'vijay@gmail.com' {} \; > ~/mylist
then check the list....
2,227
Posted By jim mcnamara
That looks like you may possibly be running on...
That looks like you may possibly be running on AIX, please give us your UNIX OS and shell.

The error means iconv cannot find the language file it needs to make the conversion. Finding what...
Forum: What is on Your Mind? 08-19-2019
2,929
Posted By jim mcnamara
Peasant, Congratulations. You have many...
Peasant,

Congratulations. You have many good posts to your credit. We appreciate your help.

Best,

Jim M
2,047
Posted By jim mcnamara
Do you need distinct awk functions for every line...
Do you need distinct awk functions for every line of text or just a few functions? Sample input, output would help a lot.

Edit: I don't understand the request either....
Forum: Programming 08-09-2019
3,392
Posted By jim mcnamara
Banging the metal - Some Solaris 10 & 11...
Banging the metal -

Some Solaris 10 & 11 performance and system analysis code runs using perl interfaces - Dtrace for example. Dtrace also runs on Linux, again perl is a major player.
...
2,253
Posted By jim mcnamara
What OS are you on? If linux there is a command...
What OS are you on? If linux there is a command to do this - seq start increment finish

seq 15.1 .1 15.7
15.1
15.2
15.3
15.4
15.5
15.6
15.7
1,208
Posted By jim mcnamara
See oracle docs about the WHENEVER SQLERROR...
See oracle docs about the WHENEVER SQLERROR clause
SQL*Plus Command Reference (https://docs.oracle.com/cd/B19306_01/server.102/b14357/ch12052.htm)

When your code hits an error, your code invokes...
Showing results 1 to 25 of 500

 

Featured Tech Videos

All times are GMT -4. The time now is 02:11 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy