I have a small script I wrote to look for empty files on a Linux box. It finds the empty files and emails the list to me. That works great. What I need to do now is set a cron job to run the thing every 10 minutes or so (no problems there) but I don't want to get any more emails if the last email has the same contents as the last time the script ran. Does that make sense? I only want to get new email if there is a change in the number or names of the empty files it finds.
Thank you for any input. I stink at scripting of any kind.
Last edited by vgersh99; 09-28-2016 at 12:57 PM..
Reason: code tags, please!
Hi all,
Am using bash shell.
Am newbie, trying to understand the debugin process of a shell script...
I am unable to comprehend the control flow ,meaning from where exactly the execution of the script begins...
I tried using bash-xv <scriptname> but since am new ,am finding it difficult to... (2 Replies)
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Issue resolved:
The 'culprit file' was .bash_aliases. It had the naughty (ASCII for the octal string Bash was detecting and returning an error about). I cleaned it up in Pico (see my post to the thread on favorite editors if you want background on why I use Pico/Nano), re-sourced it via... (0 Replies)
I'm really new to even doing a bash "hello world" script, so maybe someone would know how to do the following task, using bash scripting
Need to login using ssh from one dell server into another dell server, and obtain the raid battery status, using dell's open manage software commands; then... (5 Replies)
Hi I need a script with an if statement that goes.
I need it to search through all files within a directory with the extension .test if it finds the string '71502FSC1206' then do
sed 's/71502FSC1206/\n&/g' > send.test
If it finds the string '715MCH' or '715JAC' then I need it to move the... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
2. Shell Bash Script
3.
!/bin/bash
if
echo no directory
then
mkdir -p /home/AC_Drywall
elif ; then
echo "$dir already exist"
fi (4 Replies)
HI
I have the following requirement
I have a script a.sh which will deploy files in multiple servers .The argument for the a.sh is abc.gz host1.conf
where abc.gz is a zip file and one.conf will contain all the database connection string .
Now I have to write a b.sh which will... (7 Replies)
I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed.
#!/usr/bin/expect -f... (2 Replies)
Dear Team,
i have one question related to automation of adding new users based on txt file.
Here we go:
I have data.txt file which shows:
bang
dang
benc
One by one, after pressing enter. And now, I need scirpt which will add those users with home directory hidden within the file... (7 Replies)
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
LEARN ABOUT DEBIAN
stg-new
STG-NEW(1) StGit Manual STG-NEW(1)NAME
stg-new - Create a new, empty patch
SYNOPSIS
stg new [options] [<name>]
DESCRIPTION
Create a new, empty patch on the current stack. The new patch is created on top of the currently applied patches, and is made the new top
of the stack. Uncommitted changes in the work tree are not included in the patch -- that is handled by linkstg:refresh[].
The given name must be unique in the stack, and may only contain alphanumeric characters, dashes and underscores. If no name is given, one
is generated from the first line of the patch's commit message.
An editor will be launched to edit the commit message to be used for the patch, unless the --message flag already specified one. The
patchdescr.tmpl template file (if available) is used to pre-fill the editor.
OPTIONS --author "NAME <EMAIL>"
Set the author details.
--authname NAME
Set the author name.
--authemail EMAIL
Set the author email.
--authdate DATE
Set the author date.
-m MESSAGE, --message MESSAGE
Use MESSAGE instead of invoking the editor.
-f FILE, --file FILE
Use the contents of FILE instead of invoking the editor. (If FILE is "-", write to stdout.)
--save-template FILE
Instead of running the command, just write the message template to FILE, and exit. (If FILE is "-", write to stdout.)
When driving StGit from another program, it is often useful to first call a command with --save-template, then let the user edit the
message, and then call the same command with --file.
--sign
Add a "Signed-off-by:" to the end of the patch.
--ack
Add an "Acked-by:" line to the end of the patch.
STGIT
Part of the StGit suite - see linkman:stg[1]
StGit 03/13/2012 STG-NEW(1)