[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-admin
Subject:    Re: Changes in file (huge problem)
From:       Glynn Clements <glynn () gclements ! plus ! com>
Date:       2006-12-26 23:48:17
Message-ID: 17809.46273.917801.852834 () cerise ! gclements ! plus ! com
[Download RAW message or body]


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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic