Search Results

Search: Posts Made By: DGPickett
28,472
Posted By DGPickett
Welcome to the land of ssh, cron and at. When you...
Welcome to the land of ssh, cron and at. When you log in, you are given environment by layers of files. If a pid runs not logged in, it has to build environment. Full absolute paths are just a weak...
1,920
Posted By DGPickett
A logic tree and removing redundant tests save...
A logic tree and removing redundant tests save time. If it has a prefix char, it is medial or final else it is initial or standalone, and for prefix'ed, if not medial it is always final, no test...
Forum: HP-UX 02-17-2015
9,289
Posted By DGPickett
PS: Used/Free memory in a VM system is pretty...
PS: Used/Free memory in a VM system is pretty meaningless. Once a system goes quiescent, the free memory just represents recent proceess terminations, which make a bunch of free pages. Pages may be...
Forum: IP Networking 02-17-2015
3,173
Posted By DGPickett
Yiou can tunnel the local browser to the remote...
Yiou can tunnel the local browser to the remote host, too, usung ssh.
3,611
Posted By DGPickett
Doing date delta can be done in many languages,...
Doing date delta can be done in many languages, but for shell the easiest is the GNU date (which you can add to your system, perhaps as a user local executable) or you can search here for my tool...
7,494
Posted By DGPickett
Bold is pretty terminal specific, and done in the...
Bold is pretty terminal specific, and done in the presentation layer. Always design presentation on the end, after the data is parsed. Do you really want the shell to be the presentation tool? ...
2,682
Posted By DGPickett
Even with ERE, you need to run it twice, perhaps...
Even with ERE, you need to run it twice, perhaps conditionally if the first hits, as you used both start and end field '|'. Otherwise, you miss the following adjacent fields on a line like:...
5,159
Posted By DGPickett
Well, 'date' is just a program file, you can get...
Well, 'date' is just a program file, you can get a Gnu date and call it gdate or by path.

I wrote tm2tm as a more task oriented tool than date, not cluttered with clock setting. It is easy to...
5,159
Posted By DGPickett
Seems like sunfreeware went commercial, but SPARC...
Seems like sunfreeware went commercial, but SPARC Solaris 10 code is here: Freeware List for SPARC and Solaris 10 (http://sunfreeware.saix.net/programlistsparc10.html)
...
5,159
Posted By DGPickett
For GNU date, what's wrong with:date -d...
For GNU date, what's wrong with:date -d 'yesterday'with you format also specified? If you lack GNU date, get a copy at a trusted source. Or, you can search here for my time utility tm2tm.c, which...
1,748
Posted By DGPickett
Also, you can stop at the first file; use 'read'...
Also, you can stop at the first file; use 'read' or 'line' to detect the first line. Be careful of read, as "| read x' in ksh is fine, but in bash, read runs in an implicit subshell and x is not...
3,007
Posted By DGPickett
I'd "double quote" the $variables so the script...
I'd "double quote" the $variables so the script does not fail for all whitespace in or shell sensitive characters.

You read 'theopt' but echo 'opt', which is never set.

Usually ':' prompts...
18,094
Posted By DGPickett
I hate sed loops for one byte change per loop, so...
I hate sed loops for one byte change per loop, so you can split the lines and then rejoin them:sed '
s/^.\{0,3\}/&\
/
' | sed '
$q
N
P
s/.*\n//
s/./*/g
'|sed '
$q
N
...
2,225
Posted By DGPickett
First, you want to chop off 3 dirs; cut, sed, awk...
First, you want to chop off 3 dirs; cut, sed, awk or even just shell pattern chopping (${name#pattern}, ${name%%pattern} ) can do this.

Second, you want to add a line break before 'to200', and...
10,178
Posted By DGPickett
There are ways to limit the number of parallel...
There are ways to limit the number of parallel processes for stable, robust system use; been there before, wrote bctl (birth control):...
1,374
Posted By DGPickett
Note that while the line range says delete (361 -...
Note that while the line range says delete (361 - 182 + 1)=180 lines, the count suffix says delete 181 lines and wins, so it is equivalent to ":181,362d", and the file now contains 1-360 and 542-$,...
3,613
Posted By DGPickett
The use of numbers suggests you want to use a...
The use of numbers suggests you want to use a simple vector array, but why not skip the numbers and use just names and an associative array?
5,992
Posted By DGPickett
For bluetooth, wireless kb, mouse.
For bluetooth, wireless kb, mouse.
Forum: Programming 01-07-2015
3,695
Posted By DGPickett
Reminds me of an early C project I wrote myself...
Reminds me of an early C project I wrote myself 21 yrs. ago, which does a pure 440 hz sine wave with one byte samples and low sample rate:


a440.c
======

#include <stdio.h>
#ifdef BORLAND...
5,992
Posted By DGPickett
You might try the KB on the not hub port, to see...
You might try the KB on the not hub port, to see if the hub is a problem. Power needs on the lite hub can make problems. I try to keep rf transmitters off, for instance, and they seem to kill it.
2,182
Posted By DGPickett
Use linefeed as row sep and 'while read' to...
Use linefeed as row sep and 'while read' to unpack:LIST='1 a A
2 b B
3 c B'

echo "$LIST"|while read l
do
echo "l=$l"
done

echo "$LIST"|while read x y z
do
echo "x=$x y=$y z=$z"...
Forum: Hardware 01-02-2015
7,147
Posted By DGPickett
The conversion of 19vdc down to desired lower and...
The conversion of 19vdc down to desired lower and sometimes negative voltages is generaly done on a motherboard using power transistors, diode rectifiers, coils and capacitors. Could be one of the...
2,370
Posted By DGPickett
Not what you want, but what you asked for:a_sum=0...
Not what you want, but what you asked for:a_sum=0

while read a b c
do
if [ "$b" = "$c" ]
then
(( a_sum += a ))
fi
done <File1
You want the sum of column 1 for every set of column 2...
Forum: Programming 12-17-2014
4,294
Posted By DGPickett
Try adding the dir to $LD_LIBRARY_PATH, since it...
Try adding the dir to $LD_LIBRARY_PATH, since it is a dynamic link. If not root priviledged, you can make into a differeint install prefix using configure argument --prefix=, and link/copy the libs...
3,372
Posted By DGPickett
Generally, vi is configured by $HOME/.exrc (vi...
Generally, vi is configured by $HOME/.exrc (vi stands for visual ex, where the : part is ex). Steal a good one or lean out some of the stuff in yours. You can see options with ":se" which is akin to...
Showing results 1 to 25 of 500

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