EXEC error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting EXEC error
# 1  
Old 11-13-2008
EXEC error

Hi,

In my script i need to output the STDOUT and STDERR messages to a log file.

my code is as below.

------------------------------------------------------------------------
LogDate=`date "+%Y%m%d"`
LogDirectory=`grep -w LogDirectory ${ParameterFile}|cut -d "=" -f2`
LogFileName="${LogDirectory}/${LogDate}.txt"

exec >${LogFileName}
exec 2>${LogFileName}
------------------------------------------------------------------------

When i run the script it is giving the error as
A file or directory in the path name does not exist.
script.sh[64]: /projects/logs/20081113.txt: 0403-005 Cannot create the specified file.


I have access to create the files in /projects/logs location. I tried manually by creationg the files and sucessfull. But when i try to create a log file by running the script it is giving the error.

Any ideas please?

Thanks,
Raamc.
# 2  
Old 11-13-2008
HI what is your OS. Are you using any kind of LVM or Raid. if so is the metadata for the lvm groups consistent.
(if you have your root partition on an lvm group as well, you may have to perform a complete reboot to fix this.)
try unmounting and remounting the affected partition
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Executing perl script in Linux gives :Exec format error. Wrong Architecture

i have perl script that used to be working great , once i edit it in windows and convert it to UTF-8 and then via FTP return it . also did: chmod +x foo.pl and then when i try to run it : ./foo.pl im getting this error: ./foo.pl: Exec format error. Wrong Architecture.... (4 Replies)
Discussion started by: umen
4 Replies

2. Shell Programming and Scripting

Script Variables Inquiry, Values Okay in Standalone Exec, No-Show in Cron Exec

I have the following bash script lines in a file named test.sh. #!/bin/bash # # Write Date to cron.log # echo "Begin SSI Load $(date +%d%b%y_%T)" # # Get the latest rates file for processing. # d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1) filename=$d export filename... (3 Replies)
Discussion started by: ginowms
3 Replies

3. Shell Programming and Scripting

using rm with find -exec gives error

Greetings, Everytime I use rm with find I get errors like find: ./test: No such file or directory For exemple : hostname> mkdir test hostname> ls test hostname> find . -type d -name test -exec rm -rf {} \; find: ./test: No such file or directory hostname>ls hostname> echo $? 1 ... (2 Replies)
Discussion started by: Sekullos
2 Replies

4. UNIX for Advanced & Expert Users

find -exec with 2 commands doesn't work (error incomplete staement)

Hi Gurues, I need to modify an existing script that uses find to search a folder, and then move its contents to a folder. What I need to do is run gzip on each file after it's moved. So, I ran this little test: Put a ls.tar file on my $HOME, mkdir tmp, and then: virtuo@tnpmprd01: find .... (3 Replies)
Discussion started by: llagos
3 Replies

5. Shell Programming and Scripting

exec script error

Hi, Gurus, my script code as following: #!/usr/bin/sh mkdir dir1 result=`echo $?` if ; then echo "completed" else echo "wrong" fi When I execute it with command sh filename. , it executed successfully. but, when I execute it with command . filename it throw out error: -bash:ELF :... (2 Replies)
Discussion started by: ken002
2 Replies

6. Shell Programming and Scripting

Help with use of `` vs exec

Hi all, I had an issue regarding use of `` or exec in perl . `` are considered to be unsafe. Why? In my case an user would be giving some parameters as input and I will form an command of it and execute it using ``. It is important to capture output as i have to parse the output. As well as I need... (0 Replies)
Discussion started by: bharadiaam
0 Replies

7. UNIX for Dummies Questions & Answers

find .... -exec rm .... \; works, but gives an error

I am using find to get all the instances of a given directory name, then remove those directories with a -exec rm command. here is an example: mkdir -p foo/bar find foo -name bar -exec rm -rf {} \; foo will get deleted as I desired, however this pops out on standard error: find: foo/bar:... (3 Replies)
Discussion started by: Afifi
3 Replies

8. UNIX for Advanced & Expert Users

UNIX Backup Exec Agent Error

Hello, When launching a recently installed UNIX agent for my Veritas backup exec server I receive "getservbyname (grfs, tcp) failed!" I have checked to make sure the service exists under port 6101 and its there. I also removed and recreated the service but still no go. :confused: :confused:... (2 Replies)
Discussion started by: George26
2 Replies

9. UNIX for Dummies Questions & Answers

find command exec error

Hi All, i am writing a shell script in korn shell which deletes all the files in a directory once in every 10DAYS. the directory has different format files. the script has something like this; cd /home/data/pavi echo "Please Enter the Number of Days to search for" read DAYS... (2 Replies)
Discussion started by: pavan_test
2 Replies

10. AIX

Exec of 'dbupgrade' returned non-zero status of '0x1' error

After upgrading to IS 4.0 Sp4 I am now recieving an error when running initfnsw start Exec of 'dbupgrade' returned non-zero status of '0x1' This error appears right after trying to start the Oracle Database. This stops the FileNet software from starting. After many different attempts at... (0 Replies)
Discussion started by: jderocco
0 Replies
Login or Register to Ask a Question