Hi,
I have some file in /users/xyz directoty with .tar.gz extension. i need to find these files and if found in need to run other commands. I now the command for finding files,but how to put if condition ?please help me
Thanks
Hi,
I have some file in /users/xyz directoty with .tar.gz extension. i need to find these files and if found in need to run other commands. I now the command for finding files,but how to put if condition ?please help me
Thanks
#!/usr/bin/ksh
if [ -f /users/xyz/*.tar.gz ];
then
<do something
fi
Thanks for your reply. Now i am trying to run the following script,
Script name is TestScript.sh#!/bin/sh
if [ -f /users/home/conmjr/*.txt];
then
cd /users/back_scan
fi
But , i am getting the foolowing error
./TestScript.sh: test: ] missing
is there worng in my script
Put a space between the last character and the close bracket ]