LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[CLUG] Maximum data on the command line?

[CLUG] Maximum data on the command line?

Jerry Walsh jerry at nitroweb.net
Wed Oct 18 09:51:04 IST 2000


Don't echo data to it, pipe it
something like:

========================================
         $pgp_binary = "/usr/local/bin/pgp";
         $pgp_id = "Adam Beecher";

         $pgp_tmp = "/home/me/tmp_pgp/";
         $pgp_file = tempnam($pgp_tmp,"PGP");

         $pgp = popen("$pgp_binary -FEAT +VERBOSE=0 $pgp_id -o $pgp_file","w");
         for($i=0;$i<count($hiddens);$i++)
         {
                 fputs($pgp,"This is all highly encrypted data piped to pgp");
         }
         pclose($pgp);

         $asc_file = "$pgp_file.asc";
         if (file_exists($asc_file)){
                 $encrypted = join('',file("$pgp_file.asc"));
                 @unlink($asc_file);
         }
         else
         {
                 print "Something went wrong, are the directory permissions 
correct?";
         }

========================================

Beware of the above wrapping ;)


HTH,

Jerry.



At 00:46 18/10/00 +0100, you wrote:
>Just implementing a PGP encryption script for someone there, and I notice 
>in my
>travels that MS-DOS apparently has a limit on the amount of data you can 
>put on
>the command line. I've put a fair wedge of data on the command line in the 
>past
>doing this, but I'm wondering if there's a limit in Linux too, and if so, what
>it is?
>
>Basically, the script uses the PHP exec() function with a command line like
>this:
>
>echo $message | pgp -command-line-options
>
>The $message would usually be form data.
>
>Cheers,
>adam
>
>
>_______________________________________________
>Cork maillist  -  Cork at linux.ie
>http://www.linux.ie/mailman/listinfo/cork





More information about the Cork mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell