help with simple(?) script

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
nextdistroplease

help with simple(?) script

Post by nextdistroplease »

I thought it was simple

(I had to post using the "quote" function because the "code" function produces illegible text. I never cared for CSS styles.)
# mount the dvd

udisks --mount /dev/sr1 #1
cd /media #2
ls #3
The script will successfully mount the dvd. (#1)

The script will not even try to change directories. (#2)

The command should be easy enough to interpret. What am I doing wrong?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Habitual

Re: help with simple(?) script

Post by Habitual »

under "#!/bin/bash" stick in a

Code: Select all

set -x
run the script you have made and watch the extra output.
nextdistroplease

Re: help with simple(?) script

Post by nextdistroplease »

Habitual wrote:under "#!/bin/bash" stick in a

Code: Select all

set -x
run the script you have made and watch the extra output.
Thanks.

Sorry for the slow response.

I'll get on it forthwith,
stratus_ss

Re: help with simple(?) script

Post by stratus_ss »

you can try sending it to background as well.

For example if I run

Code: Select all

gkrellm -s <ip>
gkrellm -s <ip2>
gkrellm -s <ip3>
On the command line it launches as expected. When I put it in a shell script in never launches ip3. My workaround for that was to put each command to the background

Code: Select all

gkrellm -s <ip> &
gkrellm -s <ip2> &
gkrellm -s <ip3> &
While set -x is much prefered from troubleshooting sometimes there is no useful output produced from it
DrHu

Re: help with simple(?) script

Post by DrHu »

http://forums.fedoraforum.org/showthrea ... ost1510954
--find the data for the udev name/identity(you might not have the full name that is needed?)
https://github.com/jamielinux/bashmount
--one link (script) identified in the first links postings..
nextdistroplease

Re: help with simple(?) script

Post by nextdistroplease »

Thank you al for your help.

I am prepared to mark this thread as solved, if there is a way.
Locked

Return to “Scripts & Bash”