Sponsored Content
Full Discussion: Binary or ascii file
Top Forums Shell Programming and Scripting Binary or ascii file Post 302088398 by u263066 on Tuesday 12th of September 2006 03:40:31 AM
Old 09-12-2006
I want to get a condition how to verify the file is ascii or binary...I need to create a condition if ascii then OK otherwise fail

could you please tell me what adject line should be put in syntax...should be eq to ascii ..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Convert ASCII to BINARY

Here is what I did . . . . I FTP'd several *.pdf files from a web site to a UNIX server, and did not set the transfer mode to BIN, now Adobe thinks that the documents are corrupted. Is there a way to convert the *.pdf files to Binary so that Adobe can open them again. I would just re-download... (2 Replies)
Discussion started by: pc9456
2 Replies

2. Shell Programming and Scripting

ftp - determine ascii or binary file

Hello, How to i determine via ftp commandline if files on ftp server is ascii or binary files. Like every other comon windows ftp program does it automatically. regards Thomas (5 Replies)
Discussion started by: congo
5 Replies

3. Shell Programming and Scripting

how to check the file data type(ascii or binary)

hi i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format, please help thanks in advance satya (1 Reply)
Discussion started by: Satyak
1 Replies

4. Shell Programming and Scripting

binary to ascii

Hi, Is there a way to convert the binary file to ascii . the binary file is pipe delimited. from source the file(pipe delimited) is ftped to mainframe and from mainframe it is ftped to the unix box using binary format. Is there a way to change it back to ascii and view it? Thanks! (3 Replies)
Discussion started by: dnat
3 Replies

5. Programming

Reading a binary file in text or ASCII format

Hi All, Please suggest me how to read a binary file in text or ASCII format. thanks Nagendra (3 Replies)
Discussion started by: Nagendra
3 Replies

6. UNIX for Dummies Questions & Answers

Ascii or Binary?

Hello all, I am working with ftp servers in unix, and always I have to get and put files but I don't know exactly if I have to get or put them as an ascii or binary. Some files that I use are: .txt, .sav, .fmb, .pct, .sh, .ksh, .dat, .log. Somebody can tell me what is the difference between... (2 Replies)
Discussion started by: Geller
2 Replies

7. Shell Programming and Scripting

Difference between ascii and binary file -

what is the diff between ascii and binary file. my understand is that.. ascii file - has only line feed - \n in it where as binary file - has both line feed and carriage return in it- \r\n is that correct. also,what is the ksh command to identify whether it is a binary or ascii... (1 Reply)
Discussion started by: billpeter3010
1 Replies

8. Shell Programming and Scripting

Converting a binary file to ascii and vice versa?

Hi All, I have a binary file which is being exported from a Database, and i need to convert that to ASCII format. How can i achieve that? And this solution should work for any file which is given to us; means they will give different files from different tables. Thanks in advance. (8 Replies)
Discussion started by: baranisachin
8 Replies

9. Shell Programming and Scripting

File conversion from Binary to ASCII though UNIX command

Hi All , I have a mainframe file which contains the data in EBCDIC format.I have downloaded this file from mainframe to windows in binary format(unreadable raw data).Now I want convert this file to ASCII format(readable format data) through Unix command.I have tried iconv but that is not working... (2 Replies)
Discussion started by: STCET22
2 Replies

10. Shell Programming and Scripting

Base32 decoding binary file to ascii

I need to convert a binary file which in encoded using base32 encoding technique and convert that into readible ASCII so that i can load the same in DB. is there any command to do the same. sample from the binary file lools like : ... (18 Replies)
Discussion started by: krk
18 Replies
Mail::GnuPG(3pm)					User Contributed Perl Documentation					  Mail::GnuPG(3pm)

NAME
Mail::GnuPG - Process email with GPG. SYNOPSIS
use Mail::GnuPG; my $mg = new Mail::GnuPG( key => 'ABCDEFGH' ); $ret = $mg->mime_sign( $MIMEObj, 'you@my.dom' ); DESCRIPTION
Use GnuPG::Interface to process or create PGP signed or encrypted email. new Create a new Mail::GnuPG instance. Arguments: Paramhash... key => gpg key id keydir => gpg configuration/key directory passphrase => primary key password use_agent => use gpg-agent if non-zero always_trust => always trust a public key # FIXME: we need more things here, maybe primary key id. decrypt Decrypt an encrypted message Input: MIME::Entity containing email message to decrypt. The message can either be in RFC compliant-ish multipart/encrypted format, or just a single part ascii armored message. Output: On Failure: Exit code of gpg. (0 on success) On Success: (just encrypted) (0, undef, undef) On success: (signed and encrypted) ( 0, keyid, # ABCDDCBA emailaddress # Foo Bar <foo@bar.com> ) where the keyid is the key that signed it, and emailaddress is full name and email address of the primary uid $self->{last_message} => any errors from gpg $self->{plaintext} => plaintext output from gpg $self->{decrypted} => parsed output as MIME::Entity get_decrypt_key determines the decryption key (and corresponding mail) of a message Input: MIME::Entity containing email message to analyze. The message can either be in RFC compliant-ish multipart/signed format, or just a single part ascii armored message. Output: $key -- decryption key $mail -- corresponding mail address verify verify a signed message Input: MIME::Entity containing email message to verify. The message can either be in RFC compliant-ish multipart/signed format, or just a single part ascii armored message. Note that MIME-encoded data should be supplied unmodified inside the MIME::Entity input message, otherwise the signature will be broken. Since MIME-tools version 5.419, this can be achieved with the C<decode_bodies> method of MIME::Parser. See the MIME::Parser documentation for more information. Output: On error: Exit code of gpg. (0 on success) On success ( 0, keyid, # ABCDDCBA emailaddress # Foo Bar <foo@bar.com> ) where the keyid is the key that signed it, and emailaddress is full name and email address of the primary uid $self->{last_message} => any errors from gpg has_public_key Does the keyring have a public key for the specified email address? FIXME: document better. talk about caching. maybe put a better interface in. mime_sign sign an email message Input: MIME::Entity containing email message to sign Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be signed. (i.e. it _will_ be modified.) clear_sign clearsign the body of an email message Input: MIME::Entity containing email message to sign. This entity MUST have a body. Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be signed. (i.e. it _will_ be modified.) ascii_encrypt encrypt an email message body using ascii armor Input: MIME::Entity containing email message to encrypt. This entity MUST have a body. list of recipients Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) ascii_signencrypt encrypt and sign an email message body using ascii armor Input: MIME::Entity containing email message to encrypt. This entity MUST have a body. list of recipients Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) mime_encrypt encrypt an email message Input: MIME::Entity containing email message to encrypt list of email addresses to sign to Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) mime_signencrypt sign and encrypt an email message Input: MIME::Entity containing email message to sign encrypt list of email addresses to sign to Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) is_signed best guess as to whether a message is signed or not (by looking at the mime type and message content) Input: MIME::Entity containing email message to test Output: True or False value is_encrypted best guess as to whether a message is signed or not (by looking at the mime type and message content) Input: MIME::Entity containing email message to test Output: True or False value LICENSE
Copyright 2003 Best Practical Solutions, LLC This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; version 2 http://www.opensource.org/licenses/gpl-license.php b) the "Artistic License" http://www.opensource.org/licenses/artistic-license.php This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. AUTHOR
Robert Spier David Bremner <ddb@cpan.org> BUGS
/ISSUES/PATCHES Please send all bugs/issues/patches to bug-Mail-GnuPG@rt.cpan.org SEE ALSO
perl. GnuPG::Interface, MIME::Entity perl v5.14.2 2011-12-12 Mail::GnuPG(3pm)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy