07-15-2011
What does your input look like and what should your output look like?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guru's,
I need to create 3 files with the contents "ABC" using single command.
Iam using:
echo "ABC" > file1.txt file2.txt file3.txt
the above command is not working. pls help me...
With Regards / Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies
2. Shell Programming and Scripting
I have one base file, and multiple target files-- each have uniform line structure so no need to use grep to find things-- can just define sections by line number.
My question is quite simple-- can I use sed to copy a defined block of lines (say lines 5-10) from filename1.txt to overwrite an... (3 Replies)
Discussion started by: czar21
3 Replies
3. Shell Programming and Scripting
Hi everyone,
I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines).
Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
Discussion started by: ink_LE
6 Replies
4. Shell Programming and Scripting
Hi All,
I have a file1.txt where the index of the columns are placed. I want to get the columns from file2.txt corresponding to these index numbers.
I was usually using
awk '{print $5, $6, $2, $3, ...}' file2.txt > output.txt
However, this list is very long. So, i want to read the... (4 Replies)
Discussion started by: senayasma
4 Replies
5. Shell Programming and Scripting
I have a .txt contains a lot of lines.
Now I want to write a shell script to find out all the lines which contain the strings I want, and print these lines.
For example:
A.txt
when you post any code
you can easily do this
highlighting your code and then click
you should do a Google... (6 Replies)
Discussion started by: Henryyy
6 Replies
6. UNIX for Dummies Questions & Answers
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
7. Shell Programming and Scripting
Hi,
I`m a total newbie, well my requirement is that i have 2 files
I want to identify which countries i do not currently have in db..
how can i use the grep or another command to find this file ..
i want to match all-countries.txt with countries-in-db.txt so the output is equal to... (11 Replies)
Discussion started by: beanbaby
11 Replies
8. Shell Programming and Scripting
file1:
file2:
I need to find matches for any lines in file1 that appear in file2. Desired output is '>' plus the file1 term, followed by the line after the match in file2 (so the title is a little misleading):
This is honestly beyond what I can do without spending the whole night on it, so I'm... (2 Replies)
Discussion started by: pathunkathunk
2 Replies
9. UNIX for Dummies Questions & Answers
I want to print only the lines in file2 that match file1, in the same order as they appear in file 1
file1
file2
desired output:
I'm getting the lines to match
awk 'FNR==NR {a++}; FNR!=NR && a' file1 file2
but they are in sorted order, which is not what I want:
Can anyone... (4 Replies)
Discussion started by: pathunkathunk
4 Replies
10. Shell Programming and Scripting
Hi dears
i have text file like this:
INPUT.txt
001_1_173 j nuh ]az
001_1_174 j ]esma. nuh ]/.xori
.
.
. and have another text
like this
TABLE.txt
j j
nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
PIC2PS(9.1) PIC2PS(9.1)
NAME
pic2ps, pic2gif - convert picture files to other formats
SYNOPSIS
fb/pic2ps [ -c ] [ -h height ] [ input ]
fb/pic2gif [ -i ] [ -l ] [ -b depth ] [ input ]
DESCRIPTION
Pic2ps converts its input image (default standard input) into encapsulated PostScript, writing the result to standard output. If the input
image is full-color, its luminance is computed first, except under option -c, which produces output suitable for a color PostScript
printer. Option -h sets the output image height in inches. The default height is 3", to match the default height of the .BP macro in
troff -mpictures.
Pic2gif converts its input image (default standard input) into a Compuserv GIF format file, writing the result to standard output. It con-
verts only the first channel of the input image, which may yield wrong results -- use the -l flag or quantize(9.1) or some other dithering
filter to reduce color images to a single channel. Option -i produces an interlaced output file. Option -b sets the number of bits per
pixel in the output file. The default is 8, which is the maximum. Option -l makes pic2gif compute the NTSC luminance of its input. If
pic2gif's input contains no color map, it assumes that it is a 256 grey shade monochrome image.
SOURCE
/sys/src/fb/pic2ps.c
/sys/src/fb/pic2gif.c
SEE ALSO
mpictures(6), picfile(9.6), quantize(9.1),
PIC2PS(9.1)