Sponsored Content
Top Forums Shell Programming and Scripting zipping a directory when the file count is over $X Post 302326064 by Franklin52 on Wednesday 17th of June 2009 03:39:43 AM
Old 06-17-2009
You're using a string comparison operator in your test statement, replace this line:

Code:
if [ $FILECOUNT < $IMG_CNT_MAX ]

with:

Code:
if [ $FILECOUNT -lt $IMG_CNT_MAX ]

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

count file(s) under a specific directory

How do I count number of file in a directory. Here is what I want to do. 1. find total number of file in a directory in variable total 2. ftp all the file 3. ftp_return_code=`grep -c "Transfer complete" $logfile` if then exit 0 else exit -1 fi (6 Replies)
Discussion started by: leemjesse
6 Replies

2. UNIX for Dummies Questions & Answers

zipping all the tar files to singlr file in directory

Hi, i have more than 300 tar files in directory and i want to zip all tar files to single file. could anybody tell me the command since i know how to do zip for single tar file: bash-3.00$gzip 2008_11_10.tar bash-3.00$ pwd /oracle1/archivebackup in this directory i have lot files... (2 Replies)
Discussion started by: prakash.gr
2 Replies

3. UNIX for Dummies Questions & Answers

Creating a file to count how many files in the directory

hello there i want to creat a file that count how many files i have in the directory. for this i use the command find . -type f | wc -l > 1In1.myfile the problem with this command is that it not update after i add a new file in the directory. Anyone got any ideas how i can... (5 Replies)
Discussion started by: AntiPin
5 Replies

4. Shell Programming and Scripting

Zipping of file in a different directory

Hi, I am having some problem with a shell script which zip some files. For zipping I have used the following command: find . -name "Test_*" -mtime 0 | zip Test_$(date +"%Y%m%d") -@ I have kept the script in /home/abc directory. It is creating the zip file within the same directory where i... (2 Replies)
Discussion started by: abhishek_510
2 Replies

5. Shell Programming and Scripting

Zipping a directory and extracting to another server.

Hello everyone, I am trying to make a script in KSH that will zip an entire directory but leave out one file in that directory. I then need to send that zipped directory to another UNIX box. I am new to UNIX and would appreciate a good template to study from. (3 Replies)
Discussion started by: BrutalBryan
3 Replies

6. Shell Programming and Scripting

Count how many times in every file, strings appeared in a directory.

Hello, I have some files and i want to count how many times a string is appeared in each file. Lets say : #cat fileA stringA sdh stringB stringA #cat fileB stringB stringA sdb stringB stringB I need the output to be something like: (2 Replies)
Discussion started by: @dagio
2 Replies

7. UNIX for Dummies Questions & Answers

Deleting a directory and zipping another directory

Hi Folks, I have a directory in unix that is /usr/local/pos contain the folowing directoreis ..that is dir1 dir2 dir3 now I want to delete only dir2 please advise how to remove the directory dir 2 ..that is rm command and how to use it , and second if I want to zip the dir3 please... (1 Reply)
Discussion started by: punpun66
1 Replies

8. UNIX for Dummies Questions & Answers

Zipping the logs of directory

Hi Folks, I have logs at the following location cd /out/app/logs/ now that logs directory contain different types of logs now sometimes i need to do disk clean up activity so i need to zipped the logs can you please advise any command by which all the logs created in this directory are... (2 Replies)
Discussion started by: punpun66
2 Replies

9. Shell Programming and Scripting

Zipping contents without the actual directory

Hi , I want to zip files present in the directories listed under a parent directory without zipping the directory itself my parent directory path is /informatica/DGDMN/PowerCenter1011/server/infa_shared/SrcFiles/OTE/Final_Directory I have the below directories named as 1,2,3,4,5 listed... (9 Replies)
Discussion started by: paul1234
9 Replies

10. Shell Programming and Scripting

Total record count of all the file present in a directory

Hi All , We need one help on the below requirement.We have multiple pipe delimited .txt file(around 100 .txt files) present on one directory.We need the total record count of all the files present in that directory without header.File format as below : ... (8 Replies)
Discussion started by: STCET22
8 Replies
erl_internal(3erl)					     Erlang Module Definition						erl_internal(3erl)

NAME
erl_internal - Internal Erlang Definitions DESCRIPTION
This module defines Erlang BIFs, guard tests and operators. This module is only of interest to programmers who manipulate Erlang code. EXPORTS
bif(Name, Arity) -> bool() Types Name = atom() Arity = integer() Returns true if Name/Arity is an Erlang BIF which is automatically recognized by the compiler, otherwise false . guard_bif(Name, Arity) -> bool() Types Name = atom() Arity = integer() Returns true if Name/Arity is an Erlang BIF which is allowed in guards, otherwise false . type_test(Name, Arity) -> bool() Types Name = atom() Arity = integer() Returns true if Name/Arity is a valid Erlang type test, otherwise false . arith_op(OpName, Arity) -> bool() Types OpName = atom() Arity = integer() Returns true if OpName/Arity is an arithmetic operator, otherwise false . bool_op(OpName, Arity) -> bool() Types OpName = atom() Arity = integer() Returns true if OpName/Arity is a Boolean operator, otherwise false . comp_op(OpName, Arity) -> bool() Types OpName = atom() Arity = integer() Returns true if OpName/Arity is a comparison operator, otherwise false . list_op(OpName, Arity) -> bool() Types OpName = atom() Arity = integer() Returns true if OpName/Arity is a list operator, otherwise false . send_op(OpName, Arity) -> bool() Types OpName = atom() Arity = integer() Returns true if OpName/Arity is a send operator, otherwise false . op_type(OpName, Arity) -> Type Types OpName = atom() Arity = integer() Type = arith | bool | comp | list | send Returns the Type of operator that OpName/Arity belongs to, or generates a function_clause error if it is not an operator at all. Ericsson AB stdlib 1.17.3 erl_internal(3erl)
All times are GMT -4. The time now is 09:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy