Sponsored Content
Full Discussion: Empty Directory Check
Top Forums Shell Programming and Scripting Empty Directory Check Post 302399654 by karthigayan on Monday 1st of March 2010 06:32:39 AM
Old 03-01-2010
MySQL

To avoid separate mails for each file ,just store the non empty file's name in an array when you found the non empty file. After the loop execution manipulate the array elements and send as a mail.

Last edited by karthigayan; 03-01-2010 at 07:38 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check for empty string

Hello All, I have written shell script whcih at the max 3 parameters. When only one commandline argument and other two command line arguments are passed as empty string like eg : archive ' ' ' ' Then i need to check whether the commandline... (12 Replies)
Discussion started by: rahman_riyaz
12 Replies

2. UNIX for Dummies Questions & Answers

How to check if a file is empty?

Hi Masters..... I have problem !!! I need to check number of records in a file and if it is zero or file is empty i need to do some task. if ; then echo "File s empty" else echo "Not empty" fi so how to check this condition. I used wc -l < filename.txt => 1 for zero records same result... (1 Reply)
Discussion started by: shreekrishnagd
1 Replies

3. Shell Programming and Scripting

check if file is empty

How do I check if a file is empty in a sh script I want to test in my shell script if the output file is empty and if it is do one thing and if it isnt empty do another? any ideas? (8 Replies)
Discussion started by: stolz
8 Replies

4. Shell Programming and Scripting

check whether the directory is empty or not

I have the list of users in user.log, under each user folder there is sub1 folder is there. i want to check whether sub1 is empty or not, if it is empty i have to skip that user user folder and iterate next user folders. i have the sample code,its not giving not proper results. while read line... (8 Replies)
Discussion started by: KiranKumarKarre
8 Replies

5. Shell Programming and Scripting

check empty directory !!!

I need to check if a directory is empty using an if condition in the pseudocode below if ; then else although i looked at a few forums on this topic, I left feeling a little unclear and i could not use the command successfully what can i substitute in the if conditon above,... (2 Replies)
Discussion started by: allah_waris45
2 Replies

6. Shell Programming and Scripting

Check whether a Directory is empty or not

1.pls tell me the command for checking whether a given directory is empty or not . 2. can i check what is the last copied item in a directory . and i yes , i want to move that last copied item in another directory . pls help me with shell code for these two tasks thanks (1 Reply)
Discussion started by: upvan111
1 Replies

7. Homework & Coursework Questions

Check whether a Directory is empty or not

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: 1.pls tell me the command for checking whether a given directory is empty or not . 2. can i check what is the... (1 Reply)
Discussion started by: upvan111
1 Replies

8. Shell Programming and Scripting

Empty file check

Hi gurus , I have two files and i want to perform different action based on the condition if both or either is empty If then Do something elif then do something elif then do something else do something fi I have tried the below bt its not... (4 Replies)
Discussion started by: r_t_1601
4 Replies

9. Shell Programming and Scripting

Cant check empty string

Hello So i have that script collection, in which i have a single script to create a configuration file. In there, i have multiple occourences of something like this: prj_title=$(tui-read "What is the TITLE? ($prj_name):") ] && prj_title="${prj_name/_/ }" They all work as expected, if... (5 Replies)
Discussion started by: sea
5 Replies

10. Shell Programming and Scripting

How can I check, if on remote server directory is empty or have files?

I have a script, which is supposed to run 1 day of the month, connect to remote server certain directory, find files, tar the, and copy find . -ctime -1 | tar -cvf transfer_dmz_start_monthly.tar *${Today}*.*; if then echo "Cannot create a tar file, the terminated... (2 Replies)
Discussion started by: digioleg54
2 Replies
NFMAIL(8)						      System Manager's Manual							 NFMAIL(8)

NAME
nfmail - accept mail for a notesfile SYNOPSIS
nfmail [ -F ] [ -s ] [ -d ] [ -m mailrc ] topic DESCRIPTION
Nfmail is a mail-receiving program which takes incoming mail, parses subject and author information, and places the letter in a notesfile. Replies, marked by a ``Re:'' prefix in the Subject line, are placed in the notesfile as responses if a basenote with the appropriate title can be found. Normally, the matching of titles based on the ``Re:'' prefixes is done so that a match only occurs when the basenote titles starts with the remainder of the string. Thus, ``Re: this'' will match as a response of the basenote ``this is it'', but will not match a basenote titled ``see this note''. Specify the -F option if you wish to remove the restriction that matches start at the beginning of the title. The -s option tells nfmail to strip header lines from the letter before placing it in the notesfile. Normally, all header information is retained. The ``Subject'', and ``From'' header lines are never removed from the letter. The file /etc/Mail.rc defines default mail read- ing characteristics on many BSD systems. This file can contain lists of header lines to be ignored when presenting messages to users. Nfmail reads this file to determine which header lines are normally ignored. If this file is missing, nfmail doesn't strip any header lines. The -m option specifies further files, typically ``.mailrc'' files, to search for header lines to ignore. More than one -m option can appear on the command line. Use the -d option when you want the inserted note or response to be flagged as a director message. Nfmail usually appears as a mail alias in the file ``/etc/aliases'' in lines such as: problems: "|/usr/spool/notes/.utilities/nfmail -s problems" BUGS
The dependence on ``/etc/Mail.rc'' for lists of headers to be ignored should be cleaned up. Perhaps something where absence of the file means to strip all headers except the Subject and From lines. FILES
/usr/spool/notes/.utilities/nfmail where this program lives. /etc/aliases Mail aliases (BSD UNIX) /etc/Mail.rc Mail configuration templates SEE ALSO
delivermail(8), notes(1), Mail(1), sendmail(8), The Notesfile Reference Manual AUTHORS
Ray Essick (uiucdcs!essick, essick%uiuc@csnet-relay.arpa) Department of Computer Science University of Illinois at Urbana-Champaign Urbana, IL Rob Kolstad (kolstad@convex.UUCP) CONVEX Computer Corporation Richardson, TX University of Illinois NFMAIL(8)
All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy