Search Results

Search: Posts Made By: Moxy
7,846
Posted By Moxy
Thanks Felipe, the match function looks good.
Thanks Felipe, the match function looks good.
15,977
Posted By Moxy
If possible I would use perl for this, it is...
If possible I would use perl for this, it is perfect for this task.
Search the cpan pages for DBI and DBD::mysql, there are plenty of examples there.
7,846
Posted By Moxy
AWK break string into fields + pattern match
I am trying to break a string into separate fields and print the field that matches a pattern. I am using awk at the moment and have gotten this far:

awk '{for(i=1;i<=NF;++i)print "\t" $i}'...
3,854
Posted By Moxy
CGI shell script curl reponse problem
Hi,

I am running a bash shell script for some simple web server CGI, the script runs as expected from the browser except the following:

curl --silent --max-time 10 --output /dev/null...
6,209
Posted By Moxy
Comparing the string counts before and after is...
Comparing the string counts before and after is perfect, thanks a lot EAGL€.
6,209
Posted By Moxy
Hi Frans, how would you use the -s argument in...
Hi Frans, how would you use the -s argument in this case?
6,209
Posted By Moxy
This problem seems to be due to the way tail -f...
This problem seems to be due to the way tail -f works, it writes the last ten lines of the log file to the tmp.file even if there isn't any movement in the log file. I wonder is it possible to turn...
6,209
Posted By Moxy
Searching for a string in a log file with little movement
I have a script which tails a log file and if it finds certain strings in the data tailed it sends an email, basically like this:

tail -f logfile > tmp.file &
sleep 10
kill $!
STRING=$(grep -c...
15,220
Posted By Moxy
Thanks otheus.. thats a much nicer way of doing...
Thanks otheus.. thats a much nicer way of doing it. Btw I meant to type bash not ash, I have never used the ash shell.. Think i might try it out now just for fun.
15,220
Posted By Moxy
Assign bash command to variable
Hi

I am trying to write a function that needs to be able to assign the last run shell command to a variable. The actual command string itself not the exit code of the command.

I am using the...
2,409
Posted By Moxy
Interesting nslookup might just do the trick,...
Interesting nslookup might just do the trick, I'll give it a try.
Thanks for the suggestion.
2,409
Posted By Moxy
Sed subsitution on loop output in shell script
I have a forloop which checks a log for a set of 6 static IP addresses and each IP found is logged to a file which is then mailed to me.

After the forloop I always have a text file that may...
46,161
Posted By Moxy
Writing all the patterns to a file is a great...
Writing all the patterns to a file is a great tip.
Thanks sudhamacs it works perfectly.
46,161
Posted By Moxy
Efficient way to grep multiple strings
I have a script which searches a huge log file for the existence of a specified string and if the string is not present i receive an alert mail.
Here's an extract:

STRING=$(grep 'warning' logfile...
8,756
Posted By Moxy
Plink connections to multiple unix servers
Hi,

I have a simple windows batch file which connects to a UNIX server and runs a shell script in my home directory on the server.
It works perfectly, using plink + ssh keys in the background.
...
10,089
Posted By Moxy
Great idea, thanks Jim
Great idea, thanks Jim
24,014
Posted By Moxy
I agree with Yogesh Sawant, ssh is perfect for...
I agree with Yogesh Sawant, ssh is perfect for this.
10,089
Posted By Moxy
Grep or Tail in shell script
Hi,

I am writing a shell script that checks catalina logs on a production system and mails me if it detects errors.
It greps the logs for known errors which i have defined as variables.
The...
3,913
Posted By Moxy
Thanks for your input Ikon, you've given me some...
Thanks for your input Ikon, you've given me some useful feedback, appreciate it.
3,913
Posted By Moxy
Adding ssh commands to a shell script
I have written some scripts that do a few admin tasks on 23 servers I manage.
Usually I execute these scripts from one server by running ssh commands remotley, i.e.
ssh root@server2 shellscript,...
1,396
Posted By Moxy
Good idea I'm going to try this out. Thanks era
Good idea I'm going to try this out.
Thanks era
1,396
Posted By Moxy
Retstart script
Hi,

I am looking to create a Shell script that will edit a text file then restart Apache & finally restore the text file to its original state.
Something along the lines of this:

1. sed...
Showing results 1 to 22 of 22

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