[SATLUG] BASH script not writing to file

Rabie Khabouze rabie at rabie.net
Tue Mar 27 20:28:59 CDT 2012


Just Curious, are you trying to write in a Shared folder in the VM ? 
because that might be some permissions issues.



On 03/27/2012 05:28 PM, Michael Endsley wrote:
> Would I be correct in assuming that if you were to redirect stderr to a
> file/stdout, you might be able to get more information on what the problem
> is? Or is this an instance where errors should be showing up without any
> redirects? You can redirect stderr to a file with 2>  somefile.txt or
> redirect them to stdout (so you see them in the terminal upon execution)
> with 2>&1. Hope it helps.
>
> On Tue, Mar 27, 2012 at 3:32 PM, Henry Pugsley<henry.pugsley at gmail.com>wrote:
>
>> On Tue, Mar 27, 2012 at 3:23 PM, John Champion<satlugacct at jchampion.com>
>> wrote:
>>> Hello,
>>>
>>> Has anyone ever encountered an instance where a BASH script, written in
>>> Debian, will not write to a text file where both script and text file
>> were
>>> on a virtual machine?
>>>
>>> I am using Debian on a VMWare platform. When I use the script on a Debian
>>> dual boot, the script writes fine but when I try this in the virtual
>>> environment, something changes and I can't tell what.
>>>
>>> Thanks
>>> john
>> Double check all of your file paths in the script and your
>> environment, as well as file/directory permissions.  Make sure that
>> you're using absolute paths where possible.  Also make sure that
>> you're running the same version of bash and that you're not really
>> using dash, which is the new default for /bin/sh.  If you are using
>> any bash'isms then you'll get unexpected behavior.
>> --
>> _______________________________________________
>> SATLUG mailing list
>> SATLUG at satlug.org
>> http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
>> Powered by Rackspace (www.rackspace.com)
>>


-- 
Rabie Khabouze
_____________________
Mi Net Services
1306 Coral Bay
78251 San Antonio, TX
Tel: (+1) 210-645-5523


More information about the SATLUG mailing list