First off I'm no bin/bash script writer! I can make heads and tales of it from the php experience I have and that's all.
Now I managed to piece this script together to go look at directory and remove files that are +60 days. It's finding the files but its not removing them. I believe I have the command right.
Here's my script albeit short ..
and then I'll get an email from the server telling me ...
and if I go back to that directory .. the file still stands! |=
The permission on the file(s) is 660
The cpanel username I use is like God on here so I don't think it's a permission issue .. then again I could be wrong!
Any help would be greatly appreciated!
Last edited by Scrutinizer; 02-25-2013 at 12:29 PM..
Reason: quote tags => code tags
I don't know why the following shell script doesn't work. Could you please help me out?
#!/usr/bin/ksh
test="cal > /tmp/tmp.txt 2>&1"
$test
I know it will work for the following format:
#!/usr/bin/ksh
cal > /tmp/tmp.txt 2>&1
However, I need to get the command from the user in... (1 Reply)
Hi everyone,
I have a csh script that works fine but the output of an rsh command is different if I use boune shell instead cshell.
Is there the possibility to execute only this command in bourne shell from a script declared cshell?
Thanks
Christian (2 Replies)
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
HI,
I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging.
here is the core of the script
CFG_FILE=tab25.cfg
sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c
do
#echo "jobs output"
#jobs
#echo "jobs... (13 Replies)
Hi, I'm new to these forums, and I'm hoping that someone can solve this problem...
To make things short:
I have DD-wrt set up on a router.
I'm trying to run a script in CRON that fetches the daily password from my database using SSH.
CRON is set like so(in web interface):
* * * *... (4 Replies)
Hi ,
I have to write a shell script to telnet to specific host and execute the admin command there. Please help me to do that.
Eg : telnet hostname portno
admin command
exit (3 Replies)
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
Hi, I have a script that seems to run to completion when in the command-line, but when it is run using the cron, it seems to time out.
They both start and run fine, but on the CRON it stops prematurely.
The script hits an API every few seconds and grabs data.
Does anyone have any idea on... (4 Replies)
#!/bin/sh
# This script returns the number of rows updated from a function
echo "The execution is starting ....."
sqlplus -silent $UP <<EOF
set serveroutput on
set echo off
set pagesize 0
VAR no_rows_updated NUMBER;
EXEC :no_rows_updated :=0;
DECLARE
CURSOR c_update is
SELECT * FROM... (4 Replies)
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
LEARN ABOUT DEBIAN
aegstate
aegstate(5) File Formats Manual aegstate(5)NAME
aegstate - aegis global state file
SYNOPSIS
/var/lib/aegis/state
DESCRIPTION
The aegis state file is used to store the pointers to project directories.
CONTENTS
where = [{ ... }];
This field is a table relating project name to project directory. The structure is as follows:
project_name = string;
The name of a project.
directory = string;
Absolute path of the project's directory. (Only set of alias_for is not set.)
alias_for = string;
This is the name of another project, possibly including branch numbers. It allows you to have shorter or more meaningful
project names. (Only set if directory is not set.)
WRITING REPORT SCRIPTS
When attempting to access these fields from within the report generator, you need a code fragment similar to the following:
auto p;
p = project[project_name()];
That is, the where field is represented by the project array variable, however, it does not mention the aliases, only the actual projects,
similar to the "ael projects" command. (You can, however, index the projects array by an alias, or even by a project name with branches
on the end.)
In addition to the project_name and directory fields specified above, the report generator insets a state field, which gives you access to
the project state fields (see aepstate(5) for more information).
SEE ALSO aegis(5)
aegis file format syntax
COPYRIGHT
aegis version 4.24.3.D001
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Peter
Miller
The aegis program comes with ABSOLUTELY NO WARRANTY; for details use the 'aegis -VERSion License' command. This is free software and you
are welcome to redistribute it under certain conditions; for details use the 'aegis -VERSion License' command.
AUTHOR
Peter Miller E-Mail: millerp@canb.auug.org.au
//* WWW: http://www.canb.auug.org.au/~millerp/
Reference Manual Aegis aegstate(5)