10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I want to write a script which can grep the logs (server.log) from a file for Error String and output to a other file.
Problems:
How to know about the errors only between the current restart and not in previous as server.log has earlier restarts also?
thanks for the help! Much... (5 Replies)
Discussion started by: ankur328
5 Replies
2. Shell Programming and Scripting
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" /minecraft/server.log | awk -F":" '{print $1-2 "," $1+10 "p"}' | xargs -t -i sed -n {} /minecraft/server.log >>... (15 Replies)
Discussion started by: nbsparks
15 Replies
3. UNIX for Dummies Questions & Answers
I have a simple script that processes files. Here's a simplified example of what I'm doing:
foreach t (web.*)
mv $t dnw$t:e.log
end
foreach t (card.*)
mv $t card$t:e.log
end
The problem is that sometimes there is no web.* file. In that case, I get an error "foreach: No match" and... (4 Replies)
Discussion started by: software5723
4 Replies
4. Shell Programming and Scripting
solution found....
Please use tags for scripts, listings, and console output (2 Replies)
Discussion started by: audiolord
2 Replies
5. Shell Programming and Scripting
Hi,
I have to make a script to purge logs in a directory (this script will run automatically every day) and this script has to keep just the 30 last files.
So I want it to count all the files in the directory, find the 30 most recents and delete the others.
I just started shell scripting and... (4 Replies)
Discussion started by: jblecrou
4 Replies
6. Shell Programming and Scripting
Hi,
At work we have backups on a ftp.
I want to view 4 last files saved (their names, dates, and weight).
how can i achieve this goal using simplest way ?
Thank's. (3 Replies)
Discussion started by: simon974
3 Replies
7. Shell Programming and Scripting
hey watsup guys
i am new in the shell script world. so i need help fom you guys, i have written these two codes and they both give the same errors( expr : syntax error).
Code 1 :
#! /bin/sh
# count1 appends an increment to a file 200 times
# note that a file called numbers must be... (5 Replies)
Discussion started by: surubi_abada
5 Replies
8. Shell Programming and Scripting
Hello;
I'm trying to write a script to capture any hardware error from logs/syslog on my SUSE 10 servers so i can be notified if we have any hardware issues such a bad fan or battery, etc..
Thanks in advance for any help (2 Replies)
Discussion started by: Katkota
2 Replies
9. Shell Programming and Scripting
Hi all,
Consider i have a directory /tmp/test and inside this directory i have the following files:
1.svf.tmp
2.svf.tmp
3.svf.tmp
How can i remove the last four characters of every file in irder for the directory to be as:
1.svf
2.svf
3.svf
I use the following command but id doesn't... (6 Replies)
Discussion started by: chriss_58
6 Replies
10. Shell Programming and Scripting
heres the line i think is giving me the error. any help is appreciated.
code:
if
or posibly;
while ||
error :
usage: grep -e pattern_list...
usage: grep
-f... (2 Replies)
Discussion started by: pbonilla
2 Replies