Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Split a file with no pattern -- Split, Csplit, Awk Post 302151175 by Smiling Dragon on Thursday 13th of December 2007 06:18:23 PM
Old 12-13-2007
I would have thought dd would be a more appropriate choice for this?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Split files using Csplit

I have an excel file with more than 65K records... Since excel does not take more than 65K records i wan to split the file and send it as two excel files... Could some help me how to use the csplit by specifiying the no of records (7 Replies)
Discussion started by: savitha
7 Replies

2. Shell Programming and Scripting

Split a file based on pattern in awk, grep, sed or perl

Hi All, Can someone please help me write a script for the following requirement in awk, grep, sed or perl. Buuuu xxx bbb Kmmmm rrr ssss uuuu Kwwww zzzz ccc Roooowwww eeee Bxxxx jjjj dddd Kuuuu eeeee nnnn Rpppp cccc vvvv cccc Rhhhhhhyyyy tttt Lhhhh rrrrrssssss Bffff mmmm iiiii Ktttt... (5 Replies)
Discussion started by: kumarn
5 Replies

3. Shell Programming and Scripting

Split a file based on a pattern

Dear all, I have a large file which is composed of 8000 frames, what i would like to do is split the file into 8000 single files names file.pdb.1, file.pdb.2 etc etc each frame in the large file is seperated by a "ENDMDL" flag so my thinking is to use this flag a a point to split the files... (4 Replies)
Discussion started by: Mish_99
4 Replies

4. Shell Programming and Scripting

Split binary file with pattern

Hello! Have some problem with extract files from saved session. File contains any kind of special/printable characters. DATA NumberA DATA DATA Begin DATA1.1 DATA1.2 NumberB1 DATA1.3 DATA1.4 End DATA DATA DATA Begin DATA2.1 DATA2.2 NumberB2 DATA2.3 DATA2.4 End DATA DATA ... (4 Replies)
Discussion started by: vvild
4 Replies

5. Shell Programming and Scripting

Split File by Pattern with File Names in Source File... Awk?

Hi all, I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example: ... (2 Replies)
Discussion started by: cul8er
2 Replies

6. Shell Programming and Scripting

awk to split one field and print the last two fields within the split part.

Hello; I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies

7. Shell Programming and Scripting

Split a file based on pattern and size

Hello, I have a large file (2GB) that I would like to split based on pattern and size. I've used the following command to split the file (token is "HELLO") awk '/HELLO/{i++}{print > "file"i}' input.txt and the output is similar to the following (i included filesize in KB): 10 ... (2 Replies)
Discussion started by: jl487
2 Replies

8. Shell Programming and Scripting

split file by delimiter with csplit

Hello, I want to split a big file into smaller ones with certain "counts". I am aware this type of job has been asked quite often, but I posted again when I came to csplit, which may be simpler to solve the problem. Input file (fasta format): >seq1 agtcagtc agtcagtc ag >seq2 agtcagtcagtc... (8 Replies)
Discussion started by: yifangt
8 Replies

9. Shell Programming and Scripting

Split the file based on pattern

Hi , I have huge files around 400 mb, which has clob data and have diffeent scenarios: I am trying to pass scenario number as parameter and and get required modified file based on the scenario number and criteria. Scenario 1: file name : scenario_1.txt ... (2 Replies)
Discussion started by: sol_nov
2 Replies

10. UNIX for Advanced & Expert Users

Split one file to many based on pattern

Hello All, I have records in a file in a pattern A,B,B,B,B,K,A,B,B,K Is there any command or simple logic I can pull out records into multiple files based on A record? I want output as File1: A,B,B,B,B,K File2: A,B,B,K (9 Replies)
Discussion started by: deal1dealer
9 Replies
pbmtext(1)						      General Commands Manual							pbmtext(1)

NAME
pbmtext - render text into a bitmap SYNOPSIS
pbmtext [-font fontfile] [-builtin fontname] [-space pixels] [-lspace pixels] [text] DESCRIPTION
Takes the specified text, either a single line from the command line or multiple lines from standard input, and renders it into a bitmap. In the bitmap, each line of input is a line of output. Formatting characters such as newline have no effect on the formatting; like any unprintable character, they turn into spaces. The bitmap is just wide enough for the longest line of text, plus margins, and just high enough to contain the lines of text, plus margins. The left and right margins are twice the width of the widest character in the font; the top and bottom margins are the height of the tallest character in the font. But if the text is only one line, all the margins are half of this. OPTIONS
-font,-builtin By default, pbmtext uses a built-in font called bdf (about a 10 point Times-Roman font). You can use a fixed width font by specify- ing -builtin fixed. You can also specify your own font with the -font flag. The fontfile is either a BDF file from the X window system or a PBM file. If the fontfile is a PBM file, it is created in a very specific way. In your window system of choice, display the following text in the desired (fixed-width) font: M ",/^_[`jpqy| M / !"#$%&'()*+ / < ,-./01234567 < > 89:;<=>?@ABC > @ DEFGHIJKLMNO @ _ PQRSTUVWXYZ[ _ { ]^_`abcdefg { } hijklmnopqrs } ~ tuvwxyz{|}~ ~ M ",/^_[`jpqy| M Do a screen grab or window dump of that text, using for instance xwd, xgrabsc, or screendump. Convert the result into a pbm file. If necessary, use pnmcut to remove everything except the text. Finally, run it through pnmcrop to make sure the edges are right up against the text. pbmtext can figure out the sizes and spacings from that. -space pixels Add pixels pixels of space between characters. This is in addition to whatever space surrounding characters is built into the font, which is usually enough to produce a reasonable string of text. pixels may be negative to crowd text together, but the author has not put much thought or testing into how this works in every pos- sible case, so it might cause disastrous results. -B -lspace pixels Add pixels pixels of space between lines. This is in addition to whatever space above and below characters is built into the font, which is usually enough to produce a reasonable line spacing. pixels must be a whole number. pixels may be negative to crowd lines together, but the author has not put much thought or testing into how this works in every pos- sible case, so it might cause disastrous results. USAGE
Often, you want to place text over another image. One way to do this is with ppmlabel. ppmlabel does not give you the font options that pbmtext does, though. Another way is to use pbmtext to create an image containing the text, then use pnmcomp to overlay the text image onto your base image. To make only the text (and not the entire rectangle containing it) cover the base image, you will need to give pnmcomp a mask, via its -alpha option. You can just use the text image itself as the mask, as long as you also specify the -invert option to pnmcomp. If you want to overlay colored text instead of black, just use ppmchange to change all black pixels to the color of your choice before overlaying the text image. But still use the original black and white image for the alpha mask. If you want the text at an angle, use pnmrotate on the text image (and alpha mask) before overlaying. SEE ALSO
pnmcut(1), pnmcrop(1), pnmcomp(1), ppmchange(1), pnmrotate(1), pbmtextps(1), ppmlabel(1), pbm(5) AUTHOR
Copyright (C) 1993 by Jef Poskanzer and George Phillips 28 January 2001 pbmtext(1)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy