10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
Seeking for your assistance to compare if the file in working directory is found on the DIR2 directory and if not found move the file in DIR2.
ex. WORKING_DIR=/home/dir1/
file1.txt
DIR2=/home/admin/users
file1.txt
what i did was
found_nonempty=''
for file in... (4 Replies)
Discussion started by: znesotomayor
4 Replies
2. Shell Programming and Scripting
HI Guys,
I have some 8 files with different name and extensions. I need to check if they are present in a specific folder or not and also want that script to show me which all are not present. I can write if condition for each file but from a developer perspective , i feel that is not a good... (3 Replies)
Discussion started by: shankarpanda003
3 Replies
3. Shell Programming and Scripting
Kindly help on below script:
<<
i='find ...'
if then
echo 'File Exists'
else
echo 'File Does Not Exist'
>>
If i has some file name then it runs properly but if i has nothing ( blank value) then it throws an error. I dont exactly remember right now but error seems like:... (2 Replies)
Discussion started by: ravigupta2u
2 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
I am using the below script for checking for a file in a folder.
if ;
then
echo 0
else
echo 1
fi
Is there any way we can check for files which are starting with GL*.csv.What I am trying to do is , I have to check in a folder for the GL*.csv files if there are any files they I... (6 Replies)
Discussion started by: wangkc
6 Replies
5. Shell Programming and Scripting
I am trying to execute the following command to check the existance of a file (which has a date timestamp on it). If there are more than one file, then also it should give me 'success' result.
if
then
<do some work>
else
<no files>
fi
Since there are more than one... (18 Replies)
Discussion started by: vivek_damodaran
18 Replies
6. Web Development
Hi,
I am sharing this tip with you all.The codes given below will explain
/**
* Checking a folder is empty or not.
* @param string $folderName
* $folderName should be folder name or path
* @return TRUE/FALSE (If any file or folder found/Empty folder)
*/
function... (1 Reply)
Discussion started by: elizas
1 Replies
7. Shell Programming and Scripting
I have a list of files and their directories, starting from a particular location. e.g.
temp/new/a.c
temp/new/b.c
temp/old/a.c
temp/old/older/b.c
etc.
Now I want to check the existence of all these files in the respective directories .
I am trying something like
cat "fileList" |... (4 Replies)
Discussion started by: herojeett
4 Replies
8. UNIX for Dummies Questions & Answers
I'm sure this can't be too tough, but.
I want to check the existance of file(s) by extension. There may be 0,1,N files. If any files exist, then remove them.
Thanks for any insight. (3 Replies)
Discussion started by: niswonp
3 Replies
9. Shell Programming and Scripting
Alogorithm:
=============
Whenever any user open any specific directory:
1) cd /usr/lib
The prompt should show an Alert message like
2) echo "You have opened this folder"
How should I write shell script this one?..
It should be irrespective of users and... (11 Replies)
Discussion started by: Niroj
11 Replies
10. UNIX for Dummies Questions & Answers
Dear all,
Every hour i am receiving several data files to one folder for 24 hours each day.But some times some hours i do not have the files because of some problem.So i want to check the files inside the folder at the end of the day wether how many files i received in each hour like this.so i... (4 Replies)
Discussion started by: Nayanajith
4 Replies