Re: Changes in file (huge problem)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux