The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
606 views

Shell script: Find entries in access log with 500 response within a specified date period

Can someone help me with a shell script to figure out the number of 500 HTTP response entries in an access log within a time frame specified?
4
votes
2answers
3k views

ssh fails to execute remote command when run from cron bash script - works from CLI

I have a script, written in bash, which runs from cron. One of the first things it does is SSH to a remote host and retrieve a list of files in a directory. Everything works fine when run from the ...
0
votes
3answers
2k views

Command does not execute in crontab while command itself works just fine

I have this script from Colin Johnson on Github - https://github.com/colinbjohnson/aws-missing-tools/tree/master/ec2-automate-backup It seems great. I have modified it to send email to myself every ...
-1
votes
3answers
219 views

Script to restart httpd if crashed

With heavy trafic, it happen that's my HTTP service crash on my dedicated server. Then, I have to restart httpd service manually. I just search for a shell script that's detect if HTTP service is OK ...
-3
votes
1answer
182 views

how can execute complicated linux command inside perl [closed]

#!/usr/bin/perl @HOSTS = ("192.168.14.112", "192.168.14.90", "192.168.160.1", "192.168.160.100"); my $COUNT = 4; my $date =`date`; for my $myHost (@HOSTS) { **$count = `ping ...
1
vote
4answers
199 views

A script that verifies that Apache (or any account) has proper permission to navigate to a directory

It seems that Apache needs at least read and execute permission to all the sub-directories of a path in order to serve the files in the directory. Does anyone have a script or one-liner that could ...
0
votes
1answer
221 views

Running root script upon ssh'ing as a particular user, but not upon standard login

I would like to do the following : If I login as user ABC via the login screen, do nothing. However if I ssh as ABC, then I want to run a root script, without being prompted for roots password, and ...
0
votes
3answers
251 views

How can I make this script better?

I was wondering if there is a better way to create a file other than appending each line to the file. I did it this way so I can preserve readability, however, there is no indentation. Is there a way ...
3
votes
1answer
167 views

shell script (KSH) + set file to param & perform test between param and string

in my linux machine red-hat 5.1 - in ppp file - I have only the signature.pl string !!! remark - third application write the signature.pl string in to ppp file I set ppp file in $a param And ...
3
votes
2answers
3k views

Unix separate multiple commands which has '&' (execute in background) in the end

To separate regular commands in Unix is to put semicolon in the end like this: cd /path/to/file;./someExecutable; But it seems not working for commands like this: ./myProgram1 > /dev/null & ...
1
vote
2answers
1k views

Cannot get Exchange PowerShell script to run under Scheduled Tasks

I have a PowerShell script that works when entered directly into the PowerShell. The PowerShell program is run with the shorcut: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ...
1
vote
2answers
854 views

Incrond running but not executing commands CentOS 6.4

I have copied this question over here from StackOverflow... I have installed incron from the EPEL repository (0.5.9) (before you ask; YES, I also tried downloading the source and compiling locally ...
1
vote
3answers
434 views

linux/solaris kill many proccess with one command

Is it possible to kill all find process with one command? I do not want to kill each process as kill -9 25295 , kill -9 11994 , etc.. Rather, what I want is a simple way or command that kill all find ...
0
votes
2answers
448 views

Root crontab not executing script

I have a script listed in my roots crontab 07 9 * * * /opt/HLRSDATA_2010_OCT/HLRS_Scheduler_sp.sh > /opt/HLRSDATA_2010_OCT/logs/HLRTKJob.log This script contains the following #!/bin/bash echo ...
0
votes
5answers
3k views

want user will logout from shell on exit of bash script

I want, when a linux user exits from a shell script, that it also logs out from the bash shell. Is this possible?
-1
votes
3answers
70 views

Cannot start a script

#!/bin/bash value=$(<man.txt) echo "$value" if [ "$value" == "true" ]; then echo "startedif_manthan" ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9; sleep 30; sudo sh ...