Search Results

Search: Posts Made By: nbsparks
17,792
Posted By nbsparks
Can someone help me? I have no idea how to do...
Can someone help me? I have no idea how to do this.

Thank you.
17,792
Posted By nbsparks
Unfortunately, I'm not at the level where I can...
Unfortunately, I'm not at the level where I can make use of your advice... :confused:
17,792
Posted By nbsparks
How to define a variable in a BASH script by using a JSON file online?
Hello,

I would like to modify an existing script of mine that uses a manually defined "MCVERSION" variable and make it define that variable instead based on this JSON file stored online:...
8,618
Posted By nbsparks
Fair enough. Sorry. Didn't mean to offend or...
Fair enough. Sorry. Didn't mean to offend or break the rules. Thank you.
8,618
Posted By nbsparks
I have run into a new issue. There are...
I have run into a new issue. There are occasionally "[WARNING]" messages that I care about as much as "[SEVERE]" messages. Thus, I would like to be able to trigger on more than just "SEVERE". How...
8,618
Posted By nbsparks
Don, I won't be offended if you're done with...
Don,

I won't be offended if you're done with this thread. You gave it a solid run. I don't ever expect the amount of effort you've given on forums like this. And I certainly don't feel entitled...
8,618
Posted By nbsparks
Actually, that ' is still there. the previous...
Actually, that ' is still there. the previous post of mine consisted of two things, the script "via cat" and the output of the script (due to the "set -x") at the top of the script. If you look half...
3,459
Posted By nbsparks
Hi everyone, So the thread so far has left...
Hi everyone,

So the thread so far has left me confused. So I kept digging. If found some code and modified it to this:

if ps -u mcmaps | grep 'overviewer.py'
then
echo Running
else
...
8,618
Posted By nbsparks
weird... so I just grabbed my original data...
weird... so I just grabbed my original data sample (that you're using) and saved that as "server2.log" and redirected the last line of the script to server2.log. Still no results.

---------- Post...
8,618
Posted By nbsparks
My servers run Debian 7.1 (wheezy) 64-bit. I'll...
My servers run Debian 7.1 (wheezy) 64-bit. I'll give this a try.

---------- Post updated at 10:01 PM ---------- Previous update was at 09:52 PM ----------

I couldn't get that script to produce...
8,618
Posted By nbsparks
I threw out 10 lines as an arbitrary number...
I threw out 10 lines as an arbitrary number because it could really vary. I would think that 10 lines would be MORE than I need most of the time. And I wouldn't want to hardcode on "Mobcatcher" as...
50,280
Posted By nbsparks
I have a regular copy I do between servers. So I...
I have a regular copy I do between servers. So I just set up a public/private key pair to do the job. On one computer, I did:
ssh-keygen -t rsaThen I copied the public key to the other computer:...
8,618
Posted By nbsparks
How to grep logs for errors and receive specific additional lines?
Hi there,

I have a script that I've used to find errors in my Minecraft Server logs. But I'd like to refine that script to be more useful.

Here is the script:

grep -n "SEVERE"...
14,124
Posted By nbsparks
RudiC, to confirm, that would look like: tar...
RudiC, to confirm, that would look like:

tar cvzf /home/logs/logarchives_`date -d "-20 days" +%Y-%m\(%b\)`.tar.gz *.log

Correct?

---------- Post updated at 02:14 PM ---------- Previous...
14,124
Posted By nbsparks
Thanks! This seems to work: #!/bin/bash...
Thanks!

This seems to work:

#!/bin/bash
cd /home/logs
tar cvzf /home/logs/logarchives_`date -dy +%Y-%m-%d`.tar.gz *.log


So I will test at the end of the month with:

#!/bin/bash
cd...
14,124
Posted By nbsparks
[Solved] How to append date to filename, but base it on yesterday's date?
Hello,

I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day...
10,010
Posted By nbsparks
Current solution. Added "-w" switch. cat...
Current solution. Added "-w" switch.

cat white-list.txt >grep-list.txt
cat activity-list.txt >>grep-list.txt
grep -f grep-list.txt -w server.log >player-activity.log


This seems to work so...
10,010
Posted By nbsparks
Now my current issue with the current solution: ...
Now my current issue with the current solution:

cat white-list.txt >grep-list.txt
cat activity-list.txt >>grep-list.txt
grep -f grep-list.txt server.log >player-activity.log
It appears that the...
10,010
Posted By nbsparks
The only solution I can think of right now is... ...
The only solution I can think of right now is...


cat white-list.txt >grep-list.txt
cat activity-list.txt >>grep-list.txt
grep -f grep-list.txt server.log >player-activity.log


I can't put...
10,010
Posted By nbsparks
Sample of server.log 2013-09-17 08:43:09...
Sample of server.log

2013-09-17 08:43:09 [INFO] Starting Minecraft server on *:25565
2013-09-17 08:43:09 [INFO] This server is running CraftBukkit version git-Bukkit-1.5.2-R1.0-b2788jnks (MC:...
10,010
Posted By nbsparks
I did this: grep -f white-list.txt <(grep -f...
I did this:
grep -f white-list.txt <(grep -f activity-list.txt server.log) > temp2.logIt didn't find anything within the "activity-list.txt" file.
10,010
Posted By nbsparks
So, "names" would be my "white-list.txt" full of...
So, "names" would be my "white-list.txt" full of usernames?
And "phrases" would be my list of phrases of concern?
And "mainfile" would be the server.log that I'm parsing?
10,010
Posted By nbsparks
OK... Now I have a new spin-off issue. Is there...
OK... Now I have a new spin-off issue. Is there a way to grep "file a" (a log file) for names held in "file b" (a list of usernames) AND also file "c" (a list of specific phrases of interest that...
3,459
Posted By nbsparks
Wow... Thank you so much. I have a ton of...
Wow... Thank you so much. I have a ton of reading to do now to benefit from all that you have taught me today.
3,459
Posted By nbsparks
OK... Starting to understand more. And now I have...
OK... Starting to understand more. And now I have to go read MAN pages for each of these. I try to do that each time I learn from others on this forum.

So, can I still pipe (>>) after a process...
Showing results 1 to 25 of 58

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