Search Results

Search: Posts Made By: hegemaro
11,417
Posted By hegemaro
I've worked with very large files before but not...
I've worked with very large files before but not quite that large. Given several million lines, I found I could reduce the overall time by splitting the file into smaller units using grep, sort and...
Forum: Solaris 01-28-2009
2,197
Posted By hegemaro
You need to uncomment all of the code lines in...
You need to uncomment all of the code lines in /etc/rc2.d/S21perf. Then execute the script. I've missed this step many times myself.
41,738
Posted By hegemaro
I've run into this with Solaris and AIX. The...
I've run into this with Solaris and AIX. The gunzip command, which supports large files, will uncompress the first file in a ZIP archive ignoring all others (if present):

gunzip -c file.zip >...
18,375
Posted By hegemaro
Try protecting the spaces in the wc output with...
Try protecting the spaces in the wc output with double-quotes

echo "`ls -1 /Volumes/ximage2/$line/images/ | wc -l` $line"

That should give you a left-justified line count but everything should...
3,996
Posted By hegemaro
The E450s have a nifty little power cut-off...
The E450s have a nifty little power cut-off switch connected to the side panel. If it is not secure, the power supply will not engage. In fact, I've had a few E450s turn off because of jarring near...
51,668
Posted By hegemaro
Just to throw this out there...if the files are...
Just to throw this out there...if the files are created in a specific time order irrespective of name, then the ls -t command would work nicely. With Solaris, the last modification time is used, but...
17,832
Posted By hegemaro
My goodness, I feel old, bakunin. That's how I...
My goodness, I feel old, bakunin. That's how I would have done it without even missing a beat.

Cnfsed could also export the file system read-only via NFS from the source machine and mount it on...
Forum: What is on Your Mind? 11-29-2007
11,365
Posted By hegemaro
What free time I find is usually spent at various...
What free time I find is usually spent at various local theatres either designing sets or acting. Currently I'm Daddy Warbucks in "Annie" at the Schenectady Light Opera Company which opens on...
77,627
Posted By hegemaro
Just add a '$' at the end of your pattern to...
Just add a '$' at the end of your pattern to match the end of the line:

grep "pattern$"
8,554
Posted By hegemaro
I would check the compression first with #...
I would check the compression first with

# uncompress /opt/globusback2/needed_backups/apglsg.tar.Z


If that returns a zero return code, then the compression, at least, is fine, but the tar...
44,354
Posted By hegemaro
It's not the fastest script in the world, but it...
It's not the fastest script in the world, but it works for this situation. Save as insert.ksh.


#!/bin/ksh

while read LINE
do
if [ $(expr "$LINE" : "dn:") -ne 0 ]
...
2,786
Posted By hegemaro
It sounds as if the binaries are for a different...
It sounds as if the binaries are for a different architecture which run fine on the source machine buf fail miserably on the target machine. I would suggest FTPing the files back, in binary mode,...
Forum: Solaris 08-12-2007
18,221
Posted By hegemaro
Okay, so you're not running in daemon mode. ...
Okay, so you're not running in daemon mode. Check /etc/init.d/sendmail and search for the variable "MODE". (Note that I'm running Solaris 8 at home and I'm not sure of, if any, differences).
...
Forum: Solaris 08-12-2007
18,221
Posted By hegemaro
Of course that is the problem; my posting was...
Of course that is the problem; my posting was incomplete.

I suspect that sendmail is not running in daemon mode that is, it will send mail from the system but not receive it.

Check for an...
9,791
Posted By hegemaro
A far more elegant solution by reborg. Quite...
A far more elegant solution by reborg. Quite nice.
11,461
Posted By hegemaro
I have only seen the "tar: blocksize = 0" message...
I have only seen the "tar: blocksize = 0" message when the tar file being extracted is zero-length. Is it possible in the script you are specifying another file by mistake or, perhaps, the tar...
9,791
Posted By hegemaro
You can use sed to strip away the file name. For...
You can use sed to strip away the file name. For example, this will sum up the line count for an entire directory and save it as $I.

I=0

for LINES in $(wc -l * | sed -e "s/^ *\([0-9]*\)...
Forum: Solaris 08-11-2007
18,221
Posted By hegemaro
Have you tried connecting to the port with #...
Have you tried connecting to the port with

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 hostname.domain.net ESMTP Sendmail...
73,559
Posted By hegemaro
To remove leading spaces, use tail -1...
To remove leading spaces, use

tail -1 filename | sed -e "s/^ \{1,\}//"

or to removed trailing spaces

tail -1 filename | sed -e "s/ \{1,\}$//"
3,562
Posted By hegemaro
In Korn shell -- a personal favorite -- there are...
In Korn shell -- a personal favorite -- there are two ways of doing it both of which you have considered (I've changed the numbers a bit to make it clearer:

1 ) As an array

#!/bin/ksh

set...
3,082
Posted By hegemaro
Here is a sed(1) script file that should solve...
Here is a sed(1) script file that should solve your problem. The ^I is just the [Tab] key but it's easier to see.

s;^\([0-9]\{1,2\}\)/\([0-9]\{1,2\}\)/\([0-9]\{4\}\)^I;\3-^A0\1-^A0\2^I;...
9,964
Posted By hegemaro
sed -e "/^filesystem:/d" filename or ...
sed -e "/^filesystem:/d" filename

or

grep -v "^filesystem:" filename
6,133
Posted By hegemaro
Here is a slightly improved version of the stub...
Here is a slightly improved version of the stub script:

/usr/local/bin/logit.ksh

#!/bin/ksh

$* | while read MSG
do
echo "$(date +'%y%m%d'):$$:$1:$MSG"
done

called...
6,133
Posted By hegemaro
The "stub" script I posted after my original post...
The "stub" script I posted after my original post and just before your second post would provide you the basic functionality you're looking for. However, if the output message is more than one line,...
6,133
Posted By hegemaro
Perhaps this is more to your point: Create a...
Perhaps this is more to your point:

Create a "stub" script to which you will pass the command you want to execute complete with options. It will initially display the data you desire then call...
Showing results 1 to 25 of 133

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