10-24-2008
You will have to write a dd command or maybe C or perl, something like that. Most Unix tools have a limit to line size.
How is the format supposed to be? We need examples of input and expected output.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Everybody!
Situation:
I have a large ASCII file (for example: 1-2 Mbytes) without linebreaks (\n).
Task:
I like inserting linebreaks after all 420 digits (byte).
(pattern: *\n*\n*\n...etc.)
My problem:
How? :-)
I like using shell script or (maybe) AWK (short) program.
Please,... (2 Replies)
Discussion started by: hviktor
2 Replies
2. UNIX Desktop Questions & Answers
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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. Shell Programming and Scripting
Hi All,
I have a requirement to create a formatted text.
That is., I have a plain text composed to send it through an Email using mailx.
I need to change the formatting of the text like BOLD, ITALIC, UNDERINED, COLOURED, INDENT etc.,
First of all, is it possible in UNIX?
If yes, please let... (3 Replies)
Discussion started by: mohan_kumarcs
3 Replies
6. UNIX for Advanced & Expert Users
Hi,
I have a file which is around 193 gb in size. This file has tonnes of spaces and I need to sanitize it.
I tried to use awk script to split this file but it gave me an error like line to long...
As of now I am using a sed command to search replace the spaces; however its too slow for such a... (2 Replies)
Discussion started by: darshanw
2 Replies
7. Red Hat
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
8. UNIX for Dummies Questions & Answers
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
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
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
LEARN ABOUT DEBIAN
clientlib
CLIENTLIB(3) Library Functions Manual CLIENTLIB(3)
NAME
clientlib - NNTP clientlib part of InterNetNews library
SYNOPSIS
extern FILE *ser_rd_fp;
extern FILE *ser_wr_fp;
extern char ser_line[];
char *
getserverbyfile(file)
char *file;
int
server_init(host)
char *host;
int
handle_server_response(response, host)
int reponse;
char *host;
void
put_server(text)
char *text;
int
get_server(buff, buffsize)
char *buff;
int buffsize;
void
close_server()
DESCRIPTION
The routines described in this manual page are part of the InterNetNews library, libinn(3). They are replacements for the ``clientlib''
part of the NNTP distribution, and are intended to be used in building programs like rrn.
Getserverbyfile calls GetConfigValue to get the name of the local NNTP server. It returns a pointer to static space. The file parameter
is ignored.
Server_init opens a connect to the NNTP server at the specified host. It returns the server's response code or -1 on error. If a connec-
tion was made, then ser_rd_fp and ser_wr_fp can be used to read from and write to the server, respectively, and ser_line will contain the
server's response. Ser_line can also be used in other routines.
Handle_server_response decodes the response, which comes from the server on host. If the client is authorized, it returns 0. A client
that is only allowed to read is authorized, but handle_server_response will print a message on the standard output. If the client is not
authorized to talk to the server, then a message is printed and the routine returns -1.
Put_server sends the text in buff to the server, adding the necessary NNTP line terminators, and flushing the I/O buffer.
Get_server reads a line of text from the server into buff, reading at most buffsize characters. Any trailing
terminators are stripped
off. Get_server returns -1 on error.
Close_server sends a ``quit'' command to the server and closes the connection.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 42, dated 1997-08-04.
SEE ALSO
libinn(3).
CLIENTLIB(3)