rpi-user1
Posts: 1
Joined: Sat Jun 29, 2019 8:42 pm

Cannot remove text starting with /

Sat Jun 29, 2019 8:51 pm

Hi,

I have had an issue with removing text.This is my /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
/home/pi/webcam start

exit 0
How can I remove /home/pi/webcam start from a shell script, I am stumped. :?:

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: Cannot remove text starting with /

Sat Jun 29, 2019 9:52 pm

by remove do you mean you do not want "webcam start" to run?

Put a # in front of the line.
# /home/pi/webcam start

This will be the same as deleting the line.

At least that's what I think you mean. You want the script to end at "fi" right?
Antikythera

Return to “General discussion”