Scripting related .


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Scripting related .
# 1  
Old 11-15-2008
Scripting related .

Could any body give the solution/script to get the below...

1.script will run and detcect the files having 0kb size , and give the solution in a out put file.(Will search the file in the path let say /abc/M/)

2.Same as the above also send a mail to your mails id , with the file name stating that the file is of 0kb size ..

Giving the solution to the above and for the second one will be highly appriciated..
# 2  
Old 11-15-2008
We want to help you if you have shown that you have put some effort into solving your own problem but not to do your work for you.
What have you attempted so far and where do you get stuck?


Regards
# 3  
Old 11-15-2008
You can use find command to find the files with zero size in a path
UNIX man pages : find ()

And to send mail you can use mailx or sendmail

Linux and UNIX sendmail command help
# 4  
Old 11-16-2008
script related..

thanks for your reply...

Find for that like..

find /abc/M/ -name '*.txt' | xargs ls -l | awk '{print $5 , $9}' > myoutfile.txt

result will come to myoutfile.txt like the file having size 0 showing me like the file size and file name.

now point is same thing i need to come to me through mail also.let say my mail it alexmar@My.com.
# 5  
Old 11-16-2008
script related..

it will be great any body can give idea on this...

i want the result part of the find will send to my mail..
what ever result will come to myoutfile will also come to mail box at the same time with same result stating the same.
# 6  
Old 11-16-2008
Please don't bump up questions! Read the rules.
# 7  
Old 11-16-2008
script related..

sorry frank...

could you please help me out on the mailing part solution.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help related to clearing of shell scripting doubt

Hello Gurus, Can anybody please help me to understand as what does this lines(Marked in bold) does: _TABLESPACE_OFFLINE=`cat ${_tmp_res} | grep -iv "online" | grep -v "^*$" | grep -iv "SQL>"` ------->1 if ;then _tmp_tablespace_status=1 ... (1 Reply)
Discussion started by: hitesh1907
1 Replies

2. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

3. Shell Programming and Scripting

Unix scripting related queries

Hi, I need to know wat does if ! >$tmp_out in the below script mean: tmp_out=$SCRATCH_DIR/file_cat.$$.tmp if ! > $tmp_out then print "Could not initialize temorary file" >&2 my_exit_code=21 break fi ---------- Post updated at 04:28 AM ----------... (4 Replies)
Discussion started by: abhishek.gupta
4 Replies

4. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

5. Solaris

related to mounting.......

can i mount the same mount point to two different file system...... (4 Replies)
Discussion started by: sudhansu
4 Replies

6. Programming

related to Eclipse

I wanted to install similar automake & friends that exist in kdevelop in Eclipse also. There is a project related to this here and the plugins are at Download section. If everyone did it or might do it in the future, I am interested to know how ! If there is somebody else that has another option... (0 Replies)
Discussion started by: mihk
0 Replies

7. UNIX for Dummies Questions & Answers

related to sed

hi how can we change only the first ocurrence of a pattern using sed thank u (14 Replies)
Discussion started by: sahana
14 Replies

8. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies

9. UNIX for Dummies Questions & Answers

Unix Related

well through my 6 months education i know some unix os but i can't find one for my p3 via board can any one tell me where to find such please replay as email or private msg and thanks (3 Replies)
Discussion started by: JaMaL
3 Replies
Login or Register to Ask a Question