Re: Changes in file (huge problem)

Glynn Clements <[email protected]>
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
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 <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.