zsh-users
 help / color / mirror / code / Atom feed
From: Jason Zapman II <zapman@cc.gatech.edu>
To: zsh-users@math.gatech.edu
Subject: variables set to full lines.
Date: 28 Feb 1998 23:34:55 -0500	[thread overview]
Message-ID: <hvgyayvvxjk.fsf@vinnie.cc.gatech.edu> (raw)

I've occasionally wanted to do something like this:

for line in `cat file` ; do
	echo $line >> file1
done

where $line is set to a string containing each line in the file, rather
than each word.

Is there a way to do this?

Thanks;
Jason

-- 
     Jason Price    |     If you want to build a ship, don't drum up people 
      Theta Xi,     |   together to collect wood and don't assign them tasks
   Beta, Alpha 449  | and work, but rather teach them to long for the endless 
 jprice@poboxes.com |    immensity of the sea. -- Antoine de Saint Exupery


             reply	other threads:[~1998-03-01  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-03-01  4:34 Jason Zapman II [this message]
1998-03-01 17:35 ` Bart Schaefer

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=hvgyayvvxjk.fsf@vinnie.cc.gatech.edu \
    --to=zapman@cc.gatech.edu \
    --cc=zsh-users@math.gatech.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).