9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
There are some files with suffix dates like abc_20032019.dat abc_17032019.dat
If at least one file exists then perform some operation else exit from execution.
Korn shell
----------------------------------
array=($inputdir/abc*.dat)
If ] ]
then
echo " file exits"
else
echo " file does... (10 Replies)
Discussion started by: Rajesh123
10 Replies
2. Shell Programming and Scripting
Hi,
I need to check if a file exists on remote server using expect.
#!/bin/bash
ip_addr=10.10.10.10
user=root
passwd=Help
filename=/root/test
expect -c "
spawn ssh -n -T -o NumberOfPasswordPrompts=3 -o StrictHostKeyChecking=no $user@$ip_addr
expect \"*?assword:*\"
send --... (6 Replies)
Discussion started by: temp_user
6 Replies
3. Shell Programming and Scripting
Hi guys,
I am beginner trying to learn unix. So any help is welcomed.
My requirement is to check whether is a file exists in a particular directory or not.
The directory path and filename are taken dynamically with user interaction. So the program should continue only if the $filename... (1 Reply)
Discussion started by: maris_markur
1 Replies
4. Shell Programming and Scripting
Hi Gurus,
I have a requests to find if all the file in the filelist exist in certain directory.
example:
my filelist
abc
def
ddd
cde
afg
how can I find these 5 files exists at director /home/abc
Thanks in advance (7 Replies)
Discussion started by: ken6503
7 Replies
5. Shell Programming and Scripting
I want to perform SQL *Loader operation only if a file named "load.txt" exists in a directory "/home/loc/etc". Please help how to check this with a if condition. (8 Replies)
Discussion started by: vel4ever
8 Replies
6. Shell Programming and Scripting
cp $PATHLOGS/$DATE/*.* $TMP/logs_tmp/
cp $PATHLOGS/$DATE1/*.* $TMP/logs_tmp/
Before copying the files I have to check if the directory $DATE1 and $DATE2 exists.
If directory exists then, check if the folder contains some files.
if the file exists then, check if the file size is greater... (3 Replies)
Discussion started by: sandy1028
3 Replies
7. Shell Programming and Scripting
how can we know mount point of a particular directory.
I want to know if a particular directory <Dir1> is a mount point somewhere and if so where especially i don't know where it fits with df -k command. (0 Replies)
Discussion started by: tostay2003
0 Replies
8. Shell Programming and Scripting
Hi,
I'm writing a shell script that will create a folder if it does not exist yet. Here's the script: (this if statement is inside a while loop)
folderName="Pics"
if ! test -d folderName
then
mkdir $folderName
fi
However, after the folder Pics has been created, every time the... (3 Replies)
Discussion started by: trivektor
3 Replies
9. UNIX for Dummies Questions & Answers
Hi Everyone,
I am having problem to delete an "empty" folder ( messages attached ).
It displays "total 12" when i typed "ls -lart" on the fnxroot44 folder, but i can't view any file.
Is there any way to view those unseen files ? I don't know why option "a" is not working this time.
Would... (1 Reply)
Discussion started by: deejay
1 Replies