The code I gave you is not changing anything but is doing what you asked: replace description on file2 from entries found in file1. If you wish the code to replace file2, just:
Hello guys..
I have the following question.
lets have that i have the following variable:
$field=werfiurd383nd93bc93 c93 d93 d9e3 ddd
or
array=werfiurd383nd93bc93 c93 d93 d9e3 ddd
what i would like to do is to store the first 4 characters of gthe aboce variable in variable... (1 Reply)
Hi,
Please advise me how to perform checking in perl on the following input below.
The output criteria will be
1. field 1 will begin as 913354744 for each as example
2. field 4 must be unique.
3. field 7 is showing dd/mm/yyyy, but it require checking if unixtime should covert to... (5 Replies)
hi all,
i am trying to append the output of a find command (for different paths)in an array as below...
my $res_array;
$i=0;
$dir="/orn/ops/regs";
foreach $block("am","xb"){
$bdir="$dir/$block";
$res_array=`find $bdir ! -user mainuser -printf \"\%u \%h\\n\"`;
$i++;
}
i... (6 Replies)
Hello All,
I have been working on a great script to remotely gather server info and store it in a .txt that can be imported to .xls
I have been reading the hostnames that are in the /.shh/known_hosts file so I don't have to mess with passing a password - via ssh (not easy to do , by the... (1 Reply)
I'm in need of help for a project that I'm working on. I believe Perl would be the best way of handling the string manipulation, however, I've barely used perl, and I'm used to BASH scripting. Another note is, this project is in a Windows environment, so I can use Perl, but I do not have shell... (1 Reply)
Hello,
I have mysql binary file which logs all the database queries and i to insert all queries log in to database. First i coverted binary file to text file. and start playing with it. Text file contains following queries, some samples are,
SET INSERT_ID=1;
INSERT INTO test... (0 Replies)
I don't know if this is a big issue or not, but I'm having difficulties. I apoligize for the upcoming essay :o.
I'm writing a script, similar to a paint program that edits images, but in the form of ANSI block characters. The program so far is working. I managed to save the image into a file,... (14 Replies)
I am a UNIX newbee . I have been doing some reading lately but really need help with an an urgent requirement.After almost two days of googling I end up with 0 luck. Hopefully a guru on here will be able to help me out. Here is my requirement:
I have 20 files in a directory with detail records... (6 Replies)
Hi,
I have a file about 100 lines. Each line is about 2000 characters (each line is fixed length). In middle of each line is following constant value
0000040029892586
Now, I want to go through each line and increment by 1.
So, line 1 will have 586
line 2 will have 587, line 3 will have... (4 Replies)
Discussion started by: jakSun8
4 Replies
LEARN ABOUT NETBSD
comm
COMM(1) BSD General Commands Manual COMM(1)NAME
comm -- select or reject lines common to two files
SYNOPSIS
comm [-123f] file1 file2
DESCRIPTION
The comm utility reads file1 and file2, which should be sorted lexically, and produces three text columns as output: lines only in file1;
lines only in file2; and lines in both files.
The filename ``-'' means the standard input.
The following options are available:
-1 Suppress printing of column 1.
-2 Suppress printing of column 2.
-3 Suppress printing of column 3.
-f Fold case in line comparisons.
Each column will have a number of tab characters prepended to it equal to the number of lower numbered columns that are being printed. For
example, if column number two is being suppressed, lines printed in column number one will not have any tabs preceding them, and lines
printed in column number three will have one.
comm assumes that the files are lexically sorted; all characters participate in line comparisons.
EXIT STATUS
comm exits 0 on success, >0 if an error occurred.
SEE ALSO cmp(1), diff(1), sort(1), uniq(1)STANDARDS
The comm utility conforms to IEEE Std 1003.2-1992 (``POSIX.2'').
BSD June 6, 1993 BSD