Sponsored Content
Top Forums Shell Programming and Scripting Change: xecho: execute permission denied error Post 302377655 by simpsonjr on Friday 4th of December 2009 04:04:26 PM
Old 12-04-2009
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 up the code. (indent) Smilie

Code:
ans=y
while [ "$ans" = "y" ]
do

	cat<<here0

${bold}Please enter the name of the user you want to change:${off}

here0

	read name

	clear

	grep -in "$name" phonebook | sed -n -e 's/^/\
				/' -e 's/:/\
				/gp'

	cat<<here1
	
${blink}${bold}Please enter the record that you want to change:${off}    

here1

	read number

record=`sed -n ${number}p phonebook`

name=`echo "$record"| cut -d: -f1`
address=`echo "$record"|cut -d: -f2`
city=`echo "$record"|cut -d: -f3`
state=`echo "$record"|cut -d: -f4`
zip=`echo "$record"|cut -d: -f5`
phone=`echo "$record"|cut -d: -f6`

	echo "Do you want to change $name's name? (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new name"
     			read newname
     			name=$newname

	fi

	xecho "Do you want to change $address?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new address"
     			read newaddress
     			address=$newaddress

	fi

	echo "Do you want to change $city?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new city"
     			read newcity
     			city=$newcity

	fi

	echo "Do you want to change $state?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new state"
     			read newstate
     			state=$newstate

	fi

	echo "Do you want to change $zip?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     			echo "Please enter new zip"
     			read newzip
     			zip=$newzip

	fi

	echo "Do you want to change $phone?  (y/n) \c"
	read ans
	if [ "$ans" = "y" ]
		then 
     		echo "Please enter new phone number"
     		read newphone
     		phone=$newphone
	

	fi

	sed "$number"d phonebook > phonebook.tmp
	mv phonebook.tmp phonebook
	echo "$name:$state:$city:$state:$zip:$phone" >> phonebook
	echo "Would you like to change another record? /c"
	read ans

done



---------- Post updated at 04:04 PM ---------- Previous update was at 03:14 PM ----------

Never mind I found the issue. It was a typo.

One other issue that I am having is when a user is not found in the file it hangs until the user presses return. How can I do some type of validation?

Thanks
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. UNIX for Advanced & Expert Users

wat is execute permission denied???

hi, i have a problem and is needed by next week. when i need to run a program at the specified time using the crontab, after that the program which will send a messege to the screen using the say command, which will show "Hello" but there is an error when i run it, in the mail it show that ... (5 Replies)
Discussion started by: ckng
5 Replies

5. AIX

0403-006 Execute permission denied.

Hi i am running the below script in vio server, i changed to aix mode..then #./script1 </code> ##Set today Date as file name. vardate= date +"%m%d%y%H%M%S" varhost= hostname filename= "$varhost_$vardate" echo $filename </code> the output is ....... </code> # ./mount_test ... (6 Replies)
Discussion started by: honeym210
6 Replies

6. AIX

rm: execute permission denied in AIX

Hello All, We have an existing ssh set-up between 2 Unix servers ( Server A and Server B). Recently, we've had a problem where we cannot delete files (via app engine and even manually, after connecting thru ssh) on Server B. We manage Server A but Server B is handled by a different group, as a... (1 Reply)
Discussion started by: chipahoys
1 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Getting Error 0403-006 Execute permission denied.

Hi All, Need your help.. I am writing one script in which I am assigning value to one variable but when i am executing it is showing error "0403-006 Execute permission denied" below is the line of that script : INPUT_COUNT=wc $GIF_DIR/input/VID_RIMS.DAT | awk '{print $1}' and access... (2 Replies)
Discussion started by: NirajThakar
2 Replies

9. 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

10. HP-UX

Swinstall and rsync - execute permission denied

Hello, I have managed to install rsync using swinstall and also as far as I can tell the dependancies we didn't have. However when trying to execute the binary I get the following error :- />rsync sh: rsync: Execute permission denied. />which rsync /usr/local/bin/rsync... (10 Replies)
Discussion started by: YogaBija
10 Replies
uudemon(4)						     Kernel Interfaces Manual							uudemon(4)

NAME
uudemon.admin, uudemon.cleanu, uudemon.hour, uudemon.poll - Administrative shell scripts for polling remote systems, cleaning up spool directories, reporting status to the system administrator, and routine invocations of the uuxqt and uusched daemons SYNOPSIS
These shell scripts reside in the following directory: /usr/lib/uucp DESCRIPTION
All the scripts can be run from the command line or can be run automatically by the cron daemon. To automatically run the scripts, remove the comment character (#) from the beginning of the relevant line in the /var/spool/cron/crontabs/uucp file. This script reports status to the system administrator. It issues the uustat command to find out the status of uucp jobs. It mails the results to the uucp login ID. The script may be modified to send mail to any login ID such as the uucp administrative login ID (uucpa) or root. This script cleans up the /var/spool/uucp and /var/spool/uucppublic directories by running the uucleanup command. The uucleanup com- mand is run with the following parameters: -C7, -D7, X2, -o2, -W1. This script runs the uusched and uuxqt daemons in the background. This script polls the systems listed in the /usr/lib/uucp/Poll file. The uudemon.poll script should be scheduled before the uudemon.hour script. This allows uudemon.poll to create any command files before cron runs the uudemon.hour script. FILES
Contains the uudemon.admin, uudemon.cleanu, uudemon.hour and uudemon.poll files. Contains the uucp file. RELATED INFORMATION
Commands: cron(8), uucleanup(8), uusched(8), uuxqt(1) Files: /usr/lib/uucp delim off uudemon(4)
All times are GMT -4. The time now is 09:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy