Search Results

Search: Posts Made By: wpeckham
Forum: What is on Your Mind? 03-28-2011
7,866
Posted By wpeckham
Modems still in use.
While city and metro areas are well served, over 50% of the USA is lucky if they have dialup access to the internet. I have relatives that only got dialup in the last few years.

While out...
1,366
Posted By wpeckham
echo *
For additional detail, check the bash man page sections on special characters and expansions. The technical term is "globbing", and is also referred to in nearly any discussion of "regular...
2,617
Posted By wpeckham
Script slow
Is it that the script itself is slow, or that something it calls or starts takes a long time to return?

If it is the script itself, you can built something into the script, just as the date...
Forum: Linux 02-01-2011
4,021
Posted By wpeckham
RSH
Aside from what you already know (RSH bad, Mongo not use! Eat SSH instead.) the better way to secure RSH is to combine hosts.allow and hosts.deny so that only the AUTHORIZED stations can use it and...
2,515
Posted By wpeckham
big file
1. Always check that you are using the correct tools. Sed is a stream editor, and is wonderful for making on-the-fly edits. What you want, though, is to select or deselect lines to retain. ...
Forum: Red Hat 01-04-2011
3,198
Posted By wpeckham
script
For this compare you may wish to parse the strings from one of four integer fields internal delimited by '.' and into an array of four integers. At that point you can cascade compare by order to...
2,971
Posted By wpeckham
Compile shell script?
In answer to that question, there is no DIRECT way to compile a shell script. There ARE ways to PACKAGE a shell script, but to truly COMPILE a shell script? None that I know of.

My own methods...
Forum: Fedora 09-24-2010
25,415
Posted By wpeckham
sorting files by date
Have you looked into the options for the FIND command? It is not completely clear what environment you are workign in, but between date and find you should be able to loop through and move the files...
7,916
Posted By wpeckham
Perl
Perl is available for any box that can run the GNU compiler suite. That does not eliminate many systems. Available does not mean installed though. IF there is some odd corporate standard...
Forum: What is on Your Mind? 07-19-2010
20,585
Posted By wpeckham
Shell or PERL
It depends upon your platform and long-term goals. Generally, because it is portable nearly everywhere, I would advise PERL. Longer term: BASH and/or KORN as well. There are things that PERL is...
5,240
Posted By wpeckham
Better to do it right the first time
why not try something like:


or something of the kind. The exact formatting is not critical, but that it be correct html or xhtml to display properly when written to the html page and rendered...
Forum: Red Hat 05-24-2010
2,550
Posted By wpeckham
Console Access
What you say does not make the need clear. WHY can you not access the console? Do you mean REMOTE console access, or is there a problem logging in at the local keyboard? Does the monitor display a...
2,704
Posted By wpeckham
or find /home -name '*.msh' -print 2>/dev/null...
or
find /home -name '*.msh' -print 2>/dev/null

It will find all of the files with that extension that you have access to, and pipe the errors to the bit-bucket.
14,591
Posted By wpeckham
Bash, Perl, Python
I cannot compare Python, as I do not use snakes here. ;-)

Bash is easy and (in version 4) remarkably complete for a shell. Shell scripting starts with automating exactly what you would do on the...
8,546
Posted By wpeckham
Script for ping?
Ping varies over platforms and versions, but it tends to return a code that is reliable to consistent so that 'if ping ${target}' works.


You do need to be more clear and complete with such...
33,390
Posted By wpeckham
date
In general, even where the TZ environment variable is not set (as in several flavors of Linux based distributions) the utilities respond once if it is found in the environment when they run.

You...
21,224
Posted By wpeckham
CPU idle from the top command
Please, if you do not mind my asking, WHY are you trying to parse the CPU idle from the top command? There are better/easier ways to get the cpu idle figure. IS there some contraint that you MUST...
38,063
Posted By wpeckham
RE: cat and output filename
You might try a script: like
#!/bin/bash
# precat : cat a file with the filename prepended to each line
FILE=$1
if [ -z "$FILE" ] ; then
echo " no file specified, and I do not care to...
8,620
Posted By wpeckham
title for xterm windows.
At first glance I thought this would be easy, but tratting the output of any command expressing this code to the XTERM window successfully in 'interesting'. It is far easier to record environment...
3,983
Posted By wpeckham
Loop
Why not something simple, like
for foo in 0 1 2 3 4 5 6 7 8 9 10 ; do
echo "Count is ${foo} "
pwd
ls -l
sleep 30
done


if you are going to iterate over a known and manageable...
3,983
Posted By wpeckham
Loop
Well, you set the variable to 0 and then loop while it is >= 11.
It will, quite correctly, loop exactly 0 times.
Try chaning the >= to <= and see what happens.
2,489
Posted By wpeckham
Simple loop to start them all
#!/bin/ksh
# the one-ring script
# to start them all

# a variable to hold all of the script names
SCRIPTLIST="script1
script2
script3
...
script20"

# start all child scripts...
7,755
Posted By wpeckham
Background results
This idea works. Note the comments, many are lines I used to determine what was going on when I had a typo. If you think FOREGROUND typos are fun, wiat until you have some in the BACKGROUND!
Note...
7,755
Posted By wpeckham
Real-time status of background process
Well, if you want real-time response do not wait upon 'wait'!
Again, there are several solutions.

One easy one is to spawn all of your sub-processes, capturing each PID into a list and the output...
7,755
Posted By wpeckham
BASH concurrent processing
If you need the child processes to calculate or aquire data and exit, leaving the data for the parent, then files are appropriate. If you need the child processes to continue running and gathering...
Showing results 1 to 25 of 28

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