Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.system > #78809
| From | Huge <Huge@nowhere.much.invalid> |
|---|---|
| Newsgroups | comp.sys.mac.system |
| Subject | Re: Bash Script Problem |
| Date | 2015-08-23 08:13 +0000 |
| Organization | Piglet's Pickles & Preserves |
| Message-ID | <d3tdllFo3emU1@mid.individual.net> (permalink) |
| References | <1m9k0ik.l4day0m0szjaN%csampson@inetworld.net> <1m9kwfx.3785tg2r65k0N%csampson@inetworld.net> |
On 2015-08-23, Charles H. Sampson <csampson@inetworld.net> wrote:
[29 lines snipped]
> I changed the occurrences of &> to &>>. According to my Bash manual (by
> Chet Ramey of CWU and Brian Fox of FSF), this means "append standard
> output and standard error to ...". However, the 10.4.7 version of Bash
> is confused by this, saying it got an unexpected occurrence of ">" on
> the first line where &>> occurred. Since this was for debugging
> information, I just deleted all occurrences of &>> and things are
> looking much better.
Always better to 'touch' such files before writing to them, that way the file
gets created.
My 'bash' is similarly broken to yours, so I do this little dance, where I
copy the log to a tmp file, then append it to the real logfile;
echo "Info - Copying /home to $target/$today ..." 1>&2
/usr/bin/figlet "Copying /home to $target/$today" >> /tmp/$logfile
cp -Pprdv home $target/$today &> /tmp/$$
cat /tmp/$$ >> /tmp/$logfile # This nonsense is because &>> doesn't work
/usr/bin/figlet "=============" >> /tmp/$logfile
--
Today is Setting Orange, the 16th day of Bureaucracy in the YOLD 3181
I don't have an attitude problem.
If you have a problem with my attitude, that's your problem.
Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar
Bash Script Problem csampson@inetworld.net (Charles H. Sampson) - 2015-08-22 11:55 -0700
Re: Bash Script Problem JF Mezei <jfmezei.spamnot@vaxination.ca> - 2015-08-22 15:18 -0400
Re: Bash Script Problem Jolly Roger <jollyroger@pobox.com> - 2015-08-22 19:59 +0000
Re: Bash Script Problem Alan Baker <email@domain.com> - 2015-08-23 00:53 -0700
Re: Bash Script Problem Barry Margolin <barmar@alum.mit.edu> - 2015-08-22 18:48 -0400
Re: Bash Script Problem Jolly Roger <jollyroger@pobox.com> - 2015-08-23 00:44 +0000
Re: Bash Script Problem csampson@inetworld.net (Charles H. Sampson) - 2015-08-22 23:22 -0700
Re: Bash Script Problem Huge <Huge@nowhere.much.invalid> - 2015-08-23 08:13 +0000
Re: Bash Script Problem Barry Margolin <barmar@alum.mit.edu> - 2015-08-24 05:15 -0400
csiph-web