linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: "Mário Gamito" <gamito@gmail.com>
Cc: linux-admin@vger.kernel.org
Subject: Re: Changes in file (huge problem)
Date: Tue, 26 Dec 2006 23:48:17 +0000	[thread overview]
Message-ID: <17809.46273.917801.852834@cerise.gclements.plus.com> (raw)
In-Reply-To: <458F0DCC.3040009@gmail.com>


Mário Gamito wrote:

> Thank you so much for your answer.
> 
> I've used your code in a script and run:
> # cat passwords.sql | your_script
> 
> but all i get is a file named typescrypt with this content:
> Script started on Sun Dec 24 23:24:28 2006
> 
> What am i doing wrong ?

Did you call my script "script" by any chance?

If you run:

	cat passwords.sql | script

It will run /usr/bin/script (which logs a terminal session to a file
typically named "typescript").

If the script is in the current directory, you would need to use e.g.:

	cat passwords.sql | ./script
or:
	./script < passwords.sql

Also, it needs the execute bit set ("chmod +x") to be run directly;
you can also call sed explicitly e.g.:

	sed -f script < passwords.sql

-- 
Glynn Clements <glynn@gclements.plus.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2006-12-26 23:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-24 13:51 Changes in file (huge problem) Mário Gamito
2006-12-24 22:23 ` Glynn Clements
2006-12-24 23:31   ` Mário Gamito
2006-12-26 23:48     ` Glynn Clements [this message]
2006-12-25 10:25 ` terry white
2006-12-25 19:09   ` Mário Gamito

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=17809.46273.917801.852834@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=gamito@gmail.com \
    --cc=linux-admin@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 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).