Search Results

Search: Posts Made By: peterro
5,714
Posted By peterro
The only problem with that solution is that if...
The only problem with that solution is that if there are any log entries that are created during the application startup, they'll be lost when you copy the file back on top. You may also want to mv...
13,272
Posted By peterro
Can you change the format to simply the number of...
Can you change the format to simply the number of seconds total duration? If not, I would just convert each line to seconds and use that as to generate your average. Convert the average back to...
8,704
Posted By peterro
Expert Shell Scripting (ISBN-13: 978-1430218418)...
Expert Shell Scripting (ISBN-13: 978-1430218418) was written by an administrator as a reference for an administrator.
5,550
Posted By peterro
Do you want an xterm with a message for the...
Do you want an xterm with a message for the purpose of a message or for some other reason? If it's just for a message, you might use xmessage instead.
4,905
Posted By peterro
I would probably read each line in and convert it...
I would probably read each line in and convert it to an SQL entry and apply all those entries to the database. If you're looking for a single shell command for that, you'll probably have a hard time....
1,749
Posted By peterro
Glad you got it working. Another method would be:...
Glad you got it working. Another method would be:

grep -A 10 "interface data" your_log

This assumes the proper version of grep though.
18,010
Posted By peterro
This has worked for me but it's been a while...
This has worked for me but it's been a while since I've used it. You'll want to at least modify the To/From lines:


tmpfile=/tmp/mimetmp.$$
basefile=`basename $your_file`

cat > $tmpfile <<...
6,793
Posted By peterro
This really isn't the correct forum for your...
This really isn't the correct forum for your question. Likely there are probably errors listed prior to the 'command failed for target' message that need to be resolved.
5,969
Posted By peterro
Parse through the line and get the first:last...
Parse through the line and get the first:last values.


for i in $(eval echo "{$first..$last}")
do
echo assign etc etc $i etc etc etc $i
done
10,969
Posted By peterro
How about... #!/bin/bash ...
How about...


#!/bin/bash

username='elogic1'
domains='abcd.com efgh.com ijkl.com'
path_to_webalizer='/hsphere/shared/bin/webalizer'
path_to_logs='/hsphere/local/home/elogic1/logs/abcd.com'...
3,148
Posted By peterro
This doesn't seem to be a shell scripting...
This doesn't seem to be a shell scripting question but more of a sybase question. Wouldn't you want to ask this on a sybase forum?
5,870
Posted By peterro
I have fwtmp on my Solaris systems but it's not...
I have fwtmp on my Solaris systems but it's not on any of our Linux boxes.
3,497
Posted By peterro
Does your version of rsync have a -n switch to...
Does your version of rsync have a -n switch to perform a dry-run? From the man page:
5,870
Posted By peterro
That's pretty cool. What OS is that applicable...
That's pretty cool. What OS is that applicable to? Also, what OS is the original post using?
9,377
Posted By peterro
I suppose it depends on the cron job. Having the...
I suppose it depends on the cron job. Having the full login environment is probably convenient but is probably overkill since it likely has many pieces that are not necessary to your specific job....
9,377
Posted By peterro
You could source /etc/profile in your job or...
You could source /etc/profile in your job or script being called. The cron environment is different than an interactive shell and is much more sparse. Check out chapter 12 in Expert Shell Scripting...
5,870
Posted By peterro
Ok, I'm still sticking with this being a more...
Ok, I'm still sticking with this being a more complex problem than a single pipe-line command. If someone else has a better solution, that'd be great.

Some pseudo code:


Convert your date...
5,870
Posted By peterro
I think you're going to have a significant...
I think you're going to have a significant challenge in doing this since you'll have to determine (for each entry) whether the session time range falls within the range you would be specifying. I...
2,922
Posted By peterro
you could add set -x to the beginning...
you could add

set -x

to the beginning of your code to get some debug output. I'm not seeing anything obviously wrong with your code so more information would be needed.
20,361
Posted By peterro
What is the value of the select_return variable? ...
What is the value of the select_return variable? You also might add

set -x

to the beginning of the code to get some debug output.
1,757
Posted By peterro
DIRECTORY=`pwd` or check for the...
DIRECTORY=`pwd`

or check for the environmental variable $PWD
20,361
Posted By peterro
A general solution for calling DB queries from a...
A general solution for calling DB queries from a shell script:


SQL="select something from somewhere where some_constraints"
sqlplus username/password <<EOF
$SQL;
EOF


You could probably...
6,690
Posted By peterro
That wouldn't be part of your script environment...
That wouldn't be part of your script environment though. Are you using these aliases for something else or mainly this? You could source your .bashrc or keep the definitions in a separate file and...
6,690
Posted By peterro
Where do the aliases get defined?
Where do the aliases get defined?
3,835
Posted By peterro
instead of print $i you could echo...
instead of

print $i

you could

echo -n $i

or


for i in `lspv | awk '{print $1}`
do
attribute=`sattr -El $i | grep queue_depth | awk '{print $1 ":" $2}'`
print $i $attribute
done
Showing results 1 to 25 of 159

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