Showing error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Showing error
# 1  
Old 08-21-2014
Showing error

Code:
if [ -f "${x}"_"${y}"_abc_pqr.dat ]; then
       rm -rf "${x}"_"${y}"_abc_pqr.dat error: `then' unmatched

Can anyone please help me in correcting it.


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks

Last edited by vbe; 08-21-2014 at 11:17 AM..
# 2  
Old 08-21-2014
fi was missing
try
Code:
if [ -f "${x}"_"${y}"_abc_pqr.dat ]; then 
rm -rf "${x}"_"${y}"_abc_pqr.dat 
fi

This User Gave Thanks to Makarand Dodmis For This Post:
# 3  
Old 08-21-2014
Hey, its working Thank you so much.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect : exp_external not working / If not showing error

The big problem is that exp_internal isnt working... which makes it difficult to determine whats happening with the if statement. 1. why isnt exp_internal not working ? 2. Is there a better way to do the check of a file ? Im trying to find a "tighter" way to check that a file exists and has... (0 Replies)
Discussion started by: popeye
0 Replies

2. Shell Programming and Scripting

command showing error

Hi, I have an command which find the files modified within last 8 days and then after selecting the files from the location it make the tar format and send it to the specified destination ...now I want that this task to be automative ..that is it should happen after every 5 minutes ...for that... (3 Replies)
Discussion started by: NARESH SAXENA
3 Replies

3. Solaris

Error LED showing on E250

I've got an old E250 server where a front error LED is showing. I've read through the Sun docs (Sun Enterprise 250 Server Owner's Guide - Sun Microsystems) but it's only the 'General fault' LED (About the Status and Control Panel (Sun Enterprise 250 Server Owner's Guide) - Sun Microsystems)... (2 Replies)
Discussion started by: aussieos
2 Replies

4. Shell Programming and Scripting

how to check which line of the script is showing the error

how to check which line of the script is showing the error... like -x will print each output in stdout... but want to know exact error line trowing error.. (2 Replies)
Discussion started by: mail2sant
2 Replies

5. Solaris

ultra 10 showing Date ERROR

ultra 10 showing date error. it showing date --:--:1967 frequently.sometimes it shows correct date. (3 Replies)
Discussion started by: yesquery
3 Replies

6. Solaris

fmthard showing error with prtvtoc

Hi all, I am trying to use the disk for mirror where in the mirror disk is of 160 gb and the rootdisk is of 80 gb. when i am trying to write the vtoc i am getting below error i tried the below command #prtvtoc /dev/rdsk/c0t0d0s0 |fmthard -s -/dev/rdsk/c0t2d0s0 and got below ... (26 Replies)
Discussion started by: kumarmani
26 Replies

7. HP-UX

Error alert keep showing at console

Hi, I would like to ask for your help. I tried to log in through console to my server HP-UX 10.20 but I keep receiving error message as below: Vxfs: mesg 001: vx_nospace -/dev/vg02/lvol6 file system full Vxfs: mesg 001: vx_nospace - /dev/vg02/lvol9 file system full How should I stop this... (4 Replies)
Discussion started by: yeazas
4 Replies

8. Solaris

tar -xvf is showing error

Hi, When i am trying to untar a file for installation its showing an error like tar -xvf te_agent__sparc.en_tar.gz tar: directory checksum error Please help me to solve this issue........... (10 Replies)
Discussion started by: Renjesh
10 Replies

9. Solaris

mailx -s is showing an error

Error is like /users/d12381/check.sh: mail_sysadmin@mycompany: not found Plz help me to sort out this issue (6 Replies)
Discussion started by: Renjesh
6 Replies

10. Solaris

Interface not showing : Xview error

Hi I'm having a big trouble running a configuration tool (ftamtool) which uses xview on sunos 5.8, it refuses to start and says: XView error: could not load font 'FONT_FAMILY_SANS_SERIF... How to force the program to use installed fonts and where are fonts installed available to use ? ... (0 Replies)
Discussion started by: andryk
0 Replies
Login or Register to Ask a Question