![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Conditonal clause in expect. | akbar | Shell Programming and Scripting | 1 | 05-13-2008 04:28 PM |
| building a SET clause in shell script | shalua | Shell Programming and Scripting | 14 | 04-10-2007 03:34 PM |
| why put double square brackets in an if clause? | napolayan | UNIX for Dummies Questions & Answers | 5 | 11-16-2006 12:18 AM |
| if clause in AWK END block not working. | satnamx | Shell Programming and Scripting | 1 | 04-21-2006 03:29 AM |
| GROUP BY clause functionality in a C Program | avdtech | High Level Programming | 2 | 03-08-2005 07:40 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
if clause
hi,
pls could you help me with one program in KSH ( i have sunOS). I need to create an If clause, that prints an error message and filenames, when in a directory are found some files of null size (find . -type f -size 0 ). thanks |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
if [ -s abcd.txt ];then
echo "non empty" else echo "empty" |
|
#3
|
||||
|
||||
|
Foogle, you are missing an 'fi' in your 'if' statement.
In any event, the OP wants to inquire a directory for zero length files: Code:
for mZeroFile in `find . -type f -size 0`
do
echo 'Empty file = '${mZeroFile}
done
|
|
#4
|
|||
|
|||
|
thank you, this works good
|
|||
| Google The UNIX and Linux Forums |