Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.

Search Results

Search: Posts Made By: Don Cragun
159
Posted By Don Cragun
Both sets of commands define two variables that...
Both sets of commands define two variables that are available to everything running in the current shell execution environment.

The second set of commands (using export) also causes those two...
198
Posted By Don Cragun
I don't know of any OS that randomly picks the...
I don't know of any OS that randomly picks the next PID to use when creating a new process. But, it is theoretically possible to do it that way.

Most of the systems I have worked on have a...
522
Posted By Don Cragun
Similarly, if you change nezabudka's code from: ...
Similarly, if you change nezabudka's code from:
gawk '{u[$0]; l++} ENDFILE {print length(u), l, FILENAME; delete u; l=0}' * | sort -k1,1n

to:
gawk '{u[$0]; l++} ENDFILE {print l, length(u),...
522
Posted By Don Cragun
If you change: gawk '{l[$0]++} ENDFILE {for (i...
If you change:
gawk '{l[$0]++} ENDFILE {for (i in l) {if (l[i]==1) u++;t+=l[i]} print t, u, FILENAME; delete l; u=t=0}' *
to:
gawk '{l[$0]++} ENDFILE {for (i in l) {u++;t+=l[i]} print t, u,...
522
Posted By Don Cragun
You might note that the suggestion in post #5 in...
You might note that the suggestion in post #5 in this thread invokes awk (using only standard awk features) once and sort twice producing both of the requested sorted outputs. Unlike some of the...
522
Posted By Don Cragun
Please always tell us what shell and operating...
Please always tell us what shell and operating system you're using when you start a new thread. Don't assume that everyone who wants to help you has read all of your previous threads.
#!/bin/bash...
Forum: What is on Your Mind? 2 Weeks Ago
604
Posted By Don Cragun
Thank you all for your kind regards. I feel...
Thank you all for your kind regards.

I feel very fortunate to be able to work with a group of people like you who all work with me to help newbies learn how to use the tools that BSD, Linux, and...
Forum: Shell Programming and Scripting 2 Weeks Ago
686
Posted By Don Cragun
Hi MadeInGermany, The original awk didn't have...
Hi MadeInGermany,
The original awk didn't have as many built-in variables as nawk. For example, if an original awk script used a variable named RS (which was not defined by the original awk but is...
Forum: Shell Programming and Scripting 2 Weeks Ago
686
Posted By Don Cragun
Hi gigamesh, The following should work with...
Hi gigamesh,
The following should work with either nawk or /usr/xpg4/bin/awk on Solaris 10:
#!/bin/bash
CURR_DATE=$(TZ=GMT48 date '+%Y-%m-%d')
echo $CURR_DATE
/usr/xpg4/bin/awk -v...
150
Posted By Don Cragun
While I agree with what bakunin said in post #5...
While I agree with what bakunin said in post #5 in this thread, note that the find -newermt primary is not in the standards either.

This is why you are always asked to tell us the operating system...
150
Posted By Don Cragun
Note that using: find /path/to/files -type f...
Note that using:
find /path/to/files -type f -newermt 2017-01-01 \! -newermt 2018-01-01 -exec rm -fv \{\} \;
will invoke the rm utility once for each of the 200K files you want to remove. That is...
1,851
Posted By Don Cragun
Just using standard shell features, one could...
Just using standard shell features, one could also try:
' SRCH="Curr ART" OFS=, file[1-9] file1[0-9] file2[0-4]
or, assuming that there aren't any other filexx files where xx are decimal digits:
'...
910
Posted By Don Cragun
What operating system are you using? What...
What operating system are you using?

What shell are you using?

What compiler are you using?

What command (exactly) did you use to try to compile pangox?
873
Posted By Don Cragun
And, especially if you are trying to insert the...
And, especially if you are trying to insert the quoted text in any place other than the start of the target file or the end of the target file, why is using echo a requirement?

Is this a homework...
1,039
Posted By Don Cragun
A script that is creating files with names...
A script that is creating files with names containing a date set on the 25th day of a few months is not creating diagnostics for dates set on the 23rd day of the month because it was unable to create...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,228
Posted By Don Cragun
If what you're saying is that you want to make...
If what you're saying is that you want to make both of the above changes to that file, please make both changes in one invocation of awk instead of invoking awk twice. You will get your results...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,177
Posted By Don Cragun
1) It looks like vgersh99 has already shown you...
1) It looks like vgersh99 has already shown you how to expand shell variables for use in awk. Note, however, that his code will append to your two output files; not replace them if they already...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,228
Posted By Don Cragun
I think juggernautjoee is looking for something...
I think juggernautjoee is looking for something more like:
awk '/^02,193631306,000300032,1,/{$0 = substr($0,1,32) "2400" substr($0,37)}1' file
or if the line to be changed is always line #2:
awk...
1,063
Posted By Don Cragun
Making lots of wild assumptions about what...
Making lots of wild assumptions about what operating system (and, therefore what type of shell is installed as sh, one might try something like the following:
#!/bin/sh
IAm=${0##*/}

if [ $# -lt...
156
Posted By Don Cragun
Without a better explanation of what you're...
Without a better explanation of what you're trying to do, it is hard to give a good answer.

If you want to delete all but the last 3 words on every line, or delete the first 2 words on every line,...
1,355
Posted By Don Cragun
Note that RudiC's and Scrutinizer's suggestions...
Note that RudiC's and Scrutinizer's suggestions both depend on the fact that the orgX and orgXX strings in file2 are distinct. Had file2 also contained the line:
org2=japan
both of those...
Forum: Programming 06-14-2019
1,984
Posted By Don Cragun
Was that Solaris 11 on Sparc or on Intel? The...
Was that Solaris 11 on Sparc or on Intel? The results might be different. :)

Could it be that Ubuntu is arranging parameters on the stack based on their sizes? Weird indeed.
1,349
Posted By Don Cragun
I am very confused. The last line of your...
I am very confused.

The last line of your sample input contains at least 7 fields so the {$1=$1}1 should change colons, underscores, and minus signs to spaces leaving the rest of that line of...
522
Posted By Don Cragun
What have you tried to solve this problem on your...
What have you tried to solve this problem on your own?

Have you looked at any of the threads at the bottom of this page that show other threads that discuss similar topics? Don't any of them meet...
Forum: Programming 06-13-2019
1,984
Posted By Don Cragun
The standards don't specify how parameters are...
The standards don't specify how parameters are placed on the stack when a function is invoked and any code that assumes that parameters are placed on the stack in the order given (or in the reverse...
Showing results 1 to 25 of 500

 

Featured Tech Videos