You say you aren't trying to go that route, but that is exactly what your "desired output" and your "re-looping" show in post #1 in this thread.
I don't know what "pipe hex the python script to the text file" means.
I don't know what "print the python script against the text file" means.
By definition a text file contains a sequence of zero or more lines of text. I don't know what "Using the text file as a place holder for lines." means.
Please explain clearly in English what you are trying to do and show us (small) sample input files and the exact output you hope to produce.
Note that if you want all of the combinations of millions of lines (10**9) from one file with millions of lines (10**9) from another file you are talking about quadrillions of combinations (10**9 * 10**9 = 10**18) (i.e., quadrillions of lines of output).
This is the pipe hex example
example.py | file1./another program will be here
Example of output
example.py | file1
generating | aaa
lines | bbb
↓ | ccc
printing against | ddd
the text file | eee
I am trying to compare two file and make changes where ever its different.
for example:
Contents of file1
IP=192.165.89.11
NM=255.255.0.0
GW=192.165.89.1
Contents of file2
IP=192.165.89.11
NM=255.255.255.255
GW=192.165.89.1
NOTE HERE THAT NM IS DIFFERENT
So i want the changes... (6 Replies)
Pls help me on this. I have to 2 files like shown below:
File 1
TAIJM
AXPKIM
BEMGW
File 2
PXMPA
JYGE
IMJP
What i want to do is to paste both file to a new file on thir format:
File 3
TAIJM PXMPA
AXPKIM JYGE
BEMGW IMJP
I tried cat and print, but it doesn't work. Cn... (6 Replies)
How I can get the current make-file name in a make-file
So, if I run make with specified file:make -f target.mak
is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Hi,
I have written a small script from that iam appending the output to a file.If multiple users invoke the same script or if i invoke the same script n number of times (using &), the output file(ZZ/OUT) contains messup information.
#!/bin/bash
#
echo "Hello" >> /tmp/ZZ/OUT
sleep 10
echo... (4 Replies)
Hello All,
I am working on a script where I need to fetch the value from a log file and log file creates with different name but few thing are common
DEV_INFOMGT161_MULTI_PTC_BLD01.Stage_All_to_stp2perf1.042312114644.log
STP_12_02_01_00_RC01.Stage_stp-domain_to_stp2perf2.042312041739.log
... (2 Replies)
Hi,
I have a file that consist of around six million line, now the task is to divide this file into 12 small file so that each file would have half a million lines in it.
Thanks. (3 Replies)
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"
I need to make the output data should look like this and the output data will be part of text file:
7|1265000 |7654899 |A|
8|12660000 |76545999 |B|
The logic behind the... (6 Replies)
]I would like to make the second file label 'b' print down the first file label 'a', like shifting down the file creating new lines I want it to print all the way down until the first line of the second file hit the last line of the first file. Would I have to put this into a file itself or could I... (24 Replies)
I wish to take a backup of the file when someone tries to modify a file say /tmp/test.txt using vi, vim, cat, copy, mv commands.
I'm aware of inotify which will notify me of any changes to the file however, I wish to make a backup before and not after the changes are made to the file.
I... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT OPENSOLARIS
sdiff
sdiff(1) User Commands sdiff(1)NAME
sdiff - print differences between two files side-by-side
SYNOPSIS
sdiff [-l] [-s] [-o output] [-w n] filename1 filename2
DESCRIPTION
sdiff uses the output of the diff command to produce a side-by-side listing of two files indicating lines that are different. Lines of the
two files are printed with a blank gutter between them if the lines are identical, a < in the gutter if the line appears only in filename1,
a > in the gutter if the line appears only in filename2, and a | for lines that are different. (See the EXAMPLES section below.)
OPTIONS -l Print only the left side of any lines that are identical.to
-s Do not print identical lines.
-o output Use the argument output as the name of a third file that is created as a user-controlled merge of filename1 and filename2.
Identical lines of filename1 and filename2 are copied to output. Sets of differences, as produced by diff, are printed; where
a set of differences share a common gutter character. After printing each set of differences, sdiff prompts the user with a %
and waits for one of the following user-typed commands:
l Append the left column to the output file.
r Append the right column to the output file.
s Turn on silent mode; do not print identical lines.
v Turn off silent mode.
e l Call the editor with the left column.
e r Call the editor with the right column.
e b Call the editor with the concatenation of left and right.
e Call the editor with a zero length file.
q Exit from the program.
On exit from the editor, the resulting file is concatenated to the end of the output file.
-w n Use the argument n as the width of the output line. The default line length is 130 characters.
USAGE
See largefile(5) for the description of the behavior of sdiff when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
EXAMPLES
Example 1 An example of the sdiff command.
A sample output of sdiff follows.
x | y
a a
b <
c <
d d
> c
ENVIRONMENT VARIABLES
If any of the LC_* variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in
the environment, the operational behavior of sdiff for each corresponding locale category is determined by the value of the LANG environ-
ment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_* variables. If none of the above vari-
ables is set in the environment, the "C" locale determines how sdiff behaves.
LC_CTYPE Determines how sdiff handles characters. When LC_CTYPE is set to a valid value, sdiff can display and handle text and file-
names containing valid characters for that locale.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------------------------------------+
|ATTRIBUTE TYPE ATTRIBUTE VALUE |
|Availability SUNWesu |
|CSI Enabled |
+-----------------------------------------------------------+
SEE ALSO diff(1), ed(1), attributes(5), environ(5), largefile(5)SunOS 5.11 20 Dec 1996 sdiff(1)