All of lore.kernel.org
 help / color / mirror / Atom feed
From: "" <dave@dpomeroy.com>
To: linux-newbie@vger.kernel.org
Subject: bash scripting
Date: Fri, 13 Aug 2004 23:35:14 -0700	[thread overview]
Message-ID: <1092465314.411db2a2ca286@webmail.dpomeroy.com> (raw)



I wrote the following script to learn to read and write files.  No matter how I
try to start it it doesn't work.  

#!/bin/bash

shopt -s -o nounset

declare LINE

exec 3< test.dat

while read LINE <&3 ; do
  printf "%s\n" "$LINE" 
done

exit 0

this is the error 

[root@localhost scripts]# ./test.sh
: bad interpreter: No such file or directory
[root@localhost scripts]#

can someone point me in the write direction?  thanks again
Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

             reply	other threads:[~2004-08-14  6:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-14  6:35 dave [this message]
2004-08-14 12:36 ` bash scripting John Kelly
  -- strict thread matches above, loose matches on Subject: below --
2004-08-14 20:35 dave
2004-08-14 21:31 ` John Kelly
2004-08-14 23:13 ` Ray Olszewski
2004-08-15  3:00 dave
2004-08-15  3:12 dave

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1092465314.411db2a2ca286@webmail.dpomeroy.com \
    --to=dave@dpomeroy.com \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.