[SATLUG] BASH script not writing to file
michael.endsley at collegeplus.org
Tue Mar 27 17:28:28 CDT 2012
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>
> > 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
> > 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)
More information about the SATLUG