Sponsored Content
Operating Systems HP-UX how to read ascii file in HP-UX Post 302249840 by gyanusoni on Wednesday 22nd of October 2008 07:44:33 AM
Old 10-22-2008
Hi DustBunny

Thanks for your reply Yes I want to read file which is in ascii format and then I tried more, cat commands to read but it gives me o/p which is not understandable below is the o/p

^B^B^A^B^B^B^B^B^B^B^B^A^G^B^B^B^A^G^B^A^B^B^A^B^B^B^A^B
^A^B^B^B^B^B^B^B^B^B^B^A^B^B^B^B^B^B^B^B^B^B^B^B^B^B
^A^B^A^B^G^B^B^B^B^B^B^B^A^B^B^B^B^B^B^B^B^B^B^B^B
^B^G^B^A^B^B^B^B^A^B^B^B^B^B^A^B^B^A^B^F^A^B^B^B^B^A^A^A^B
^B^B^A^B^A^B^B^A^B^B^B^B^B^A^B^G^B^B^A^B^A^B^B^B^B^B^B^B
^B^B^A^B^B^B^B^B^A^B^B^B^B^A^B^B^B^B^B^B^B^A^B^A^A^B^B^B
^B^B^B^B^B^B^A^A^A^B^B^B^B^B^B^B^B^A^B^A^B^B^B^B^B^T^B
^G^B^B^B^B^B^B^B^B^B^B^B^B^B^B^B^B^B^A^B^B^B^B^B^B


And the same response from dos2ux command.

I tried the strings command too it gave me the some o/p but not all it chop up the contents while displaying as it reduces the file size.

Last edited by gyanusoni; 10-22-2008 at 08:55 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

ASCII file

I've been having trouble trying to read an ASCII file. I'm on an IRIX machine, by the way. I've tried "cat" and I get a bunch of unreadable text, and the "string" command gets the "Command not Found" error. Please advise. Thanks. (1 Reply)
Discussion started by: sherbet808
1 Replies

2. Shell Programming and Scripting

How to convert English text file to ASCII File?

file abc abc: English text I want to convert the above into file abc file: ascii text (1 Reply)
Discussion started by: laknar
1 Replies

3. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

4. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

5. UNIX for Dummies Questions & Answers

Read an ascii as cell-tabulated form

Hi Guys, I was wondering if it is possible to load a space-tabulated ascii as a "cell-tabulated form", something like excel. I have the following information: tracl tracr fldr ep cdp cdpt nhs duse scalel scalco sx sy counit ns dt igi year day hour minute sec timbas 1 1 1 1 1 1 1 1 -1000... (9 Replies)
Discussion started by: Gery
9 Replies

6. Red Hat

Unable to convert EBCDIC file to ASCII file

Hello all, To give you all a little bit of background. We recently migrated from HP-UX to Redhat Linux and one of the command I used to run on HP-UX to convert an EBCDIC file to ASCII file isn't working on Linux. The code is as follow: cat workout2.dat | dd cbs=250 conv=block conv=ascii... (3 Replies)
Discussion started by: sethmj
3 Replies

7. Programming

How to read extended ASCII characters from stdin?

Hi, I want to read extended ASCII characters from keyboard using c language on unix/linux. How to read extended characters from keyboard or by copy-paste in terminal irrespective of locale set in the system. I want to read the input characters from keyboard, store it in an array or some local... (3 Replies)
Discussion started by: sanzee007
3 Replies

8. UNIX for Dummies Questions & Answers

After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted

Hi Folks, While transferring file from FTP software like Filezilla the files gets corrupted. Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies

9. Shell Programming and Scripting

Convert Hex to Ascii in a Ascii file

Hi All, I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting? Thanks in Advance (2 Replies)
Discussion started by: HemaV
2 Replies

10. UNIX for Beginners Questions & Answers

Convert EBCDIC(.DAT) FILE into ASCII FILE

Hi Team, I am having 100 EBCDIC files (i.e. DAT extension) and need to convert them into ASCII File by unix shell script. I tried with DD Command but its not providing output as expected. Sample Text: ------------------ גהאבדוחס@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Expected Output:... (2 Replies)
Discussion started by: JSM
2 Replies
Clam Daemon(8)							  Clam AntiVirus						    Clam Daemon(8)

NAME
clamd - an anti-virus daemon SYNOPSIS
clamd [options] DESCRIPTION
The daemon listens for incoming connections on Unix and/or TCP socket and scans files or directories on demand. It reads the configuration from /etc/clamd.conf COMMANDS
It's recommended to prefix clamd commands with the letter z (eg. zSCAN) to indicate that the command will be delimited by a NULL character and that clamd should continue reading command data until a NULL character is read. The null delimiter assures that the complete command and its entire argument will be processed as a single command. Alternatively commands may be prefixed with the letter n (e.g. nSCAN) to use a newline character as the delimiter. Clamd replies will honour the requested terminator in turn. If clamd doesn't recognize the command, or the command doesn't follow the requirements specified below, it will reply with an error message, and close the connection. Clamd recognizes the following commands: PING Check the server's state. It should reply with "PONG". VERSION Print program and database versions. RELOAD Reload the virus databases. SHUTDOWN Perform a clean exit. SCAN file/directory Scan a file or a directory (recursively) with archive support enabled (if not disabled in clamd.conf). A full path is required. CONTSCAN file/directory Scan file or directory (recursively) with archive support enabled and don't stop the scanning when a virus is found. MULTISCAN file/directory Scan file in a standard way or scan directory (recursively) using multiple threads (to make the scanning faster on SMP machines). INSTREAM It is mandatory to prefix this command with n or z. Scan a stream of data. The stream is sent to clamd in chunks, after INSTREAM, on the same socket on which the command was sent. This avoids the overhead of establishing new TCP connections and problems with NAT. The format of the chunk is: '<length><data>' where <length> is the size of the following data in bytes expressed as a 4 byte unsigned integer in network byte order and <data> is the actual chunk. Streaming is terminated by sending a zero-length chunk. Note: do not exceed StreamMaxLength as defined in clamd.conf, otherwise clamd will reply with INSTREAM size limit exceeded and close the connection. FILDES It is mandatory to newline terminate this command, or prefix with n or z. This command only works on UNIX domain sockets. Scan a file descriptor. After issuing a FILDES command a subsequent rfc2292/bsd4.4 style packet (with at least one dummy character) is sent to clamd carrying the file descriptor to be scanned inside the ancillary data. Alternatively the file descriptor may be sent in the same packet, including the extra character. STATS IIt is mandatory to newline terminate this command, or prefix with n or z, it is recommended to only use the z prefix. Replies with statistics about the scan queue, contents of scan queue, and memory usage. The exact reply format is subject to change in future releases. IDSESSION, END It is mandatory to prefix this command with n or z, and all commands inside IDSESSION must be prefixed. Start/end a clamd session. Within a session multiple SCAN, INSTREAM, FILDES, VERSION, STATS commands can be sent on the same socket without opening new connections. Replies from clamd will be in the form '<id>: <response>' where <id> is the request number (in ascii, starting from 1) and <response> is the usual clamd reply. The reply lines have same delimiter as the corresponding command had. Clamd will process the commands asynchronously, and reply as soon as it has finished processing. Clamd requires clients to read all the replies it sent, before sending more commands to prevent send() deadlocks. The recommended way to implement a client that uses IDSESSION is with non-blocking sockets, and a select()/poll() loop: whenever send would block, sleep in select/poll until either you can write more data, or read more replies. Note that using non-blocking sockets without the select/poll loop and alternating recv()/send() doesn't comply with clamd's requirements. If clamd detects that a client has deadlocked, it will close the connection. Note that clamd may close an IDSESSION connection too if you don't follow the protocol's requirements. VERSIONCOMMANDS It is mandatory to prefix this command with either n or z. It is recommended to use nVERSIONCOMMANDS. Print program and database versions, followed by "| COMMANDS:" and a space-delimited list of supported commands. Clamd <0.95 will recognize this as the VERSION command, and reply only with their version, without the commands list. This command can be used as an easy way to check for IDSESSION support for example. DEPRECATED COMMANDS STREAM Scan stream - on this command clamd will return "PORT number" you should connect to and send data to scan. (DEPRECATED, use INSTREAM instead) NOT SUPPORTED COMMANDS SESSION, END Start/end a clamd session which will allow you to run multiple commands per TCP session. (use IDSESSION instead) OPTIONS
-h, --help Output help information and exit. -V, --version Print the version number and exit. -c FILE, --config-file=FILE Read configuration from FILE. SIGNALS
Clamd recognizes the following signals: SIGHUP Reopen the logfile. SIGUSR2 Reload the signature databases. SIGTERM Perform a clean exit. FILES
/etc/clamd.conf CREDITS
Please check the full documentation for credits. AUTHOR
Tomasz Kojm <tkojm@clamav.net> SEE ALSO
clamd.conf(5), clamdscan(1), freshclam(1), freshclam.conf(5), clamav-milter(8) ClamAV 0.96.1 February 12, 2009 Clam Daemon(8)
All times are GMT -4. The time now is 10:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy