Search Results

Search: Posts Made By: Carson Dyle
11,798
Posted By Carson Dyle
Run a program as another user
I have a bash script that launches another problem. I need to run that program under a certain user account. The script itself is run using 'sudo <scriptname>'.

#!/bin/bash
myprogram=...
exec...
2,650
Posted By Carson Dyle
Thanks. I think I've got it now.
Thanks. I think I've got it now.
2,650
Posted By Carson Dyle
:) How can a non-empty variable evaluate to...
:)

How can a non-empty variable evaluate to 'true' _and_ a variable containing, say, the value '1' evaluate to 'false'?
2,650
Posted By Carson Dyle
Ah, ok... Is that because the non-empty string is...
Ah, ok... Is that because the non-empty string is evaluated as 'true', or does it mean that non-zero will be evaluated as 'false'?

I came across something that said that function return values are...
2,650
Posted By Carson Dyle
Thank you both. However, the results aren't what...
Thank you both. However, the results aren't what I'd expect.

Inside function testfunc()
testfunc() returned true


Shouldn't I be seeing 'false' by returning 0 from the function?
2,650
Posted By Carson Dyle
Newbie bash scripting help requested
Hi,

I'm very new to bash scripting and Linux in general. I'm running Ubuntu Server 10.04 and trying to write a bash script to launch a program. In doing so, I've come across a couple of things...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy