9 More Discussions You Might Find Interesting
1. 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
2. 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
3. Shell Programming and Scripting
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies
4. UNIX for Dummies Questions & Answers
I need to create multiple directories if those directories do not exist already. How would you go by doing this.
What I have so far.
array=(one two three)
for I in ${array}
do
if ]
then
mkdir ${I}
fi
doneI have a good feeling this is done incorrectly. The error I am... (2 Replies)
Discussion started by: jrymer
2 Replies
5. Shell Programming and Scripting
Hi,
I would like to check whether all the directories exists or not. I tried the below but it gives some error. below is the excerpt from my original script
24 #Check if the required directories are exists
25 dirExists() {
26
27 if
28 then
29 echo "required... (1 Reply)
Discussion started by: lookinginfo
1 Replies
6. 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
7. Shell Programming and Scripting
Hi all,
I have the following code:
if ; then echo 'folder not exist'; else echo 'folder exist'; fi
The "testing" folder is not exist in /home/batch , but thhe result is 'folder exist'. It seems that the code cannot detect that the folder "testing" not exist.
ANybody know the... (1 Reply)
Discussion started by: suigion
1 Replies
8. Shell Programming and Scripting
Hai All,
please help me in solving this assignment!!!
i need a unix script that has to check the text file exists or not in all directories and sub directories if textfile exists display the directory path else display does not exists!!
example: kamal.txt that i want to search if the... (5 Replies)
Discussion started by: G.K.K
5 Replies
9. 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