Search Results

Search: Posts Made By: reid
1,212
Posted By reid
Another option. I don't know if this works with...
Another option. I don't know if this works with AIX, but

du -sh $(find /opt -type f -size +10M) | sort -nr

produces these results (files larger than 10MB):
...
1,777
Posted By reid
Perl one liner to wrap comment lines
Greetings fellow scripters.

I find myself editing multiple files, sometimes with the same bits of information. My bash script, a changelog, and a plist file (OS X). Once I realized this, I...
1,451
Posted By reid
Corona, If I'd have exercised that bit...
Corona,

If I'd have exercised that bit between my ears... I'll try this out in my script.
1,451
Posted By reid
Robin, What I'm trying to do is display the...
Robin,

What I'm trying to do is display the top level directory as du is grabbing size data from it's contents, and grab the total size of all contents for a variable used later in a script.
...
1,451
Posted By reid
Perhaps I am overthinking (I can't deny that I do...
Perhaps I am overthinking (I can't deny that I do that frequently), however on both Ubuntu and OS X,
VAR=$(du -a ./ | awk -F'[/ \t]' '{ T += $1 ; printf("\rChecking %40s", $2) >"/dev/stderr" } END...
1,451
Posted By reid
Tee multiple streams to create a var
Greetings,

It seems obvious to me that I am missing something here. I have the following:


cfDU ()
{
clear
printf "Calculating Sizes of Data In:"
while [ -n $2...
5,045
Posted By reid
agama, Took me a moment to decipher what you...
agama,

Took me a moment to decipher what you suggested, but it is perfect and simple. Two things I love in my scripts.

Thanks!!
5,045
Posted By reid
tee and functions
Greetings!

My apologies if this has been answered elsewhere before. What I have is a function (as below) set up to append to either an error log or info log based upon input.


myLOGGER ()
{...
2,180
Posted By reid
Thank you both for your replies. Didn't realize...
Thank you both for your replies. Didn't realize the backticks were deprecated/obsolete. Still see both methods in use on so many of the examples. Love being able to come here and get quick polite...
2,180
Posted By reid
intermittent bc parse error
Thought I had this worked out, and the equations work fine on their own.

What I have is an if statement that checks the raw size of a folder. Smaller than a certain threshold and it returns a...
1,514
Posted By reid
I would use the simpler method of checking /proc,...
I would use the simpler method of checking /proc, but the directory doesn't exist in OS X.

I'll try -n and see if that resolves the error.
thanks!
1,514
Posted By reid
While loop error
I have a while loop in my script that works most times, but has generated an error once that has me a bit confused. I'm using ps to grab the runtime of a backgrounded command, and testing it to...
9,409
Posted By reid
Perfect, that was exactly what I was looking for!
Perfect, that was exactly what I was looking for!
9,409
Posted By reid
set -x within script and capture as a file
Okay, I've been working on a script for providing information on the progress of a backgrounded ditto command. Thanks to google and a lot of searching I've resolved all but one very odd error. At...
1,268
Posted By reid
Script sometimes creates an empty file
I have a script that runs ditto for me, and occasionally (if I exit the script while ditto is running in the background) it will leave an empty file named 0 in the script's directory. The next time I...
1,721
Posted By reid
Script sometimes creates an empty file
I have a script that runs ditto for me, and occasionally (if I exit the script while ditto is running in the background) it will leave an empty file named 0 in the script's directory. The next time I...
10,976
Posted By reid
or sed echo "a;s;v;g" | awk -F ";"...
or sed

echo "a;s;v;g" | awk -F ";" '{$(NF--)=""; print}' | sed "s/\ /;/g"
Showing results 1 to 17 of 17

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