Permission error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Permission error
# 1  
Old 01-27-2009
Permission error

for FNAME in `find /unixsxxx/interface/2.0/xxxxxxx -type f \( -name '*.KSH' -o -name '*.sh' -o -name '*.sql' -o -name '*.ksh' \) -exec grep -il xxx.xxx.xxx.xxx {} \;`; do C=`grep -c xxx.xxx.xxx.xxx ${FNAME}`; echo "${C}:${FNAME}" >> /unixsxxx/apps/41.txt;done

How to avoid my command from aborting when it comes across an error
# 2  
Old 01-27-2009
Why did you start a new post when it's related to your other one. The changes introduced there would probably make it easier to trace execution and find a solution.
# 3  
Old 01-27-2009
Did not work

I tried creation of a script but could not get it to work. I am new to Unix's and just learning on the fly.

find /unixsxxx/STAT_HOME/ -type f -exec grep -il unixsxxx {} \;
while read ${FNAME};
do
grep -c `unixsxxx` ${FNAME};
echo "${C}:${FNAME}" >> /unixsxxx/apps/outputfile.txt;
done

I want to put into my file th path and the filename plus the count of the file. I do not want my script to abort for errors.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pipe, permission denied error

Hello, I am trying to stream lines written into file. When first source is down, I expect the code to swap to second line and run it. Script below works as usual and it prints out each line of the input file (s.txt): #!/bin/bash while read -r line; do echo "$line" done <"$1" exit 0Output... (12 Replies)
Discussion started by: baris35
12 Replies

2. Programming

Permission error while using execve..

Hi, I have the following scenario.. 1) I have a binary which i launch from command line. It executes fine. 2) But when I launch it from another file using execve command, it gives a message that it is not able to access a shared object ".so" in /usr/bin (message is "Permission... (4 Replies)
Discussion started by: sathish1000
4 Replies

3. UNIX for Dummies Questions & Answers

Webserver permission denied error

Hello, I was trying a perl-cgi tutorial and saving the data from online form to a file named (guests.txt). I am using the localhost port 80 for practice. My page file "guestbook.html" is working as I saw the online form. After filled out the blanks and submit, I was expecting to see the result... (3 Replies)
Discussion started by: yifangt
3 Replies

4. Shell Programming and Scripting

Change: xecho: execute permission denied error

Hello, I am have an issues with one of my scripts. I get the following error when I get to the point in the script where I am making the change. The change does take however. the error is "change: xecho: execute permission denied" Everything was working properly until I start cleaning... (3 Replies)
Discussion started by: simpsonjr
3 Replies

5. OS X (Apple)

Permission Denied Error with X11

Hello, I am using Tiger 10.4.11 I am trying out the GIMP, so I installed the X11 package from "Optional Installs" on the cd. Whenever I open X11, I get an error: xterm: could not exec /dev/null: Permission denied I have chmodded /dev/null to 777, as well as the /tmp directory. I deleted... (2 Replies)
Discussion started by: Ricardo-san
2 Replies

6. UNIX for Dummies Questions & Answers

script permission error

I am writing a VERY simple script that copies my catalina log file to a new filename then copies /dev/null inotthe catalina.out. Since the log is the live log, it is open and written to as I copy. I can do the 2 copy commands from a command promp with no problem, it works. I have the probmel in... (2 Replies)
Discussion started by: rschille
2 Replies

7. UNIX for Advanced & Expert Users

Need help with Couldn't canonicalise: Permission denied error

Hi People I am getting this error Couldn't canonicalise: Permission denied. Anyone knows what does this error mean ? It all started when my team members were testing Sftp functions on some directories and they were hitting directory no found errors within their scripts. So when we enquired... (8 Replies)
Discussion started by: wilsontan
8 Replies

8. Shell Programming and Scripting

xterm gives me permission denied error

When I try to run xterm at a command prompt in solaris 2.5.1, i'm getting a permission denied error. But the directory and user permissions look ok, they are part of a users group and then also root,sys,adm so what gives? Any ideas? Thanks! (1 Reply)
Discussion started by: kymberm
1 Replies

9. UNIX for Advanced & Expert Users

getcwd: permission denied error

When I do a 'cd /appl' and issue 'ls -al' command, I get the following error for .. directory. ./..: Permission denied But still I get a listing of other directories under /appl. Also, if I give 'man' for any command under this /appl folder, I get the following error: ... (3 Replies)
Discussion started by: Deepa
3 Replies

10. UNIX for Dummies Questions & Answers

rm Permission Denied error

I am very new to Unix. We have a script that will remove files from a directory. The account removing the files has the same permissions as the directory the files are located. We have logged in as the account and deleted the files from that directory but when we run the script with the account... (7 Replies)
Discussion started by: Cech2002
7 Replies
Login or Register to Ask a Question