Hi Guys,
Requirement: Want to compare two files, if the the content of both files is same then show "Good result" else Show "Bad Result"
I am using the following logic
if( cmp -s a b = 0 )
then
echo "Good result"
else echo "Bad result"
exit 0
fi
But this is... (1 Reply)
Hi,
I need to compare 2 files based on the first field in each file and output the differences to a new file.
example File 1 and File 2 both have first field as Number ie:
File 1
1252652355
1859553322
1778899562
File 2
1252652355
1859553322
So I would expect File 3 to... (2 Replies)
I have a file with the following:
87565
82155
102656
151
162
I want to write korn shell script that will read each line in a loop and remove any number that has less than 5 digits, e.g., 151 and 152.
thank you,
Keoki:confused: (4 Replies)
I want to compare "N" (around 2000+) number of huge files located in a directory A against "N" files located in a different directory using Bash scripting.
Please help me with any scripts available.
Thanks. (2 Replies)
how can i unix compare two files??
var1 = 6499 7328 6351 7583 7573
var2 = 6499 7328 6351 7583 7777
i did:
diff $var1 $var2
and i got the output:
1c1
< 6499 7328 6351 7583 7573
---
> 6499 7328 6351 7583 7777
what can i do with it? and what does it tell me?? how can i knoe that... (2 Replies)
I have two files which have primary key(s) for each row.
I need to compare both the files and produce the output in the following format.
Primary key(s),file1 value,file2 value.
Both the input files will be comma separated files.
I have accomplished this using perl, but it is... (6 Replies)
one.txt
ONS.1287677000.820.log 20Oct2010
ONS.1287677000.123.log 21Oct2010
ONS.1287677000.456.log 22Oct2010
two.txt
ONS.1287677000.820.log:V AC CC EN
ONS.1287677000.123.log:V AC CC EN
ONS.1287677000.820.log:V AC CC EN
In file two.txt
i have to look for pattern which column one... (17 Replies)
Hi Gurus
I need your kind help sorting the below query
I have two text files
File1.txt
ID Name Address
101 Srinath BBB
102 Sidharth CCC
File2.txt
ID Name Address
102 Siddharth DDD
103 Suman EEE
Now the requirement is if the second file has... (0 Replies)
Hi,
I have two files
File1 Contents:
abc
dcf
sdc
File2 Contents:
dcf
sdc
erg
Now my program should return the contents existing in File1 but not in File2. In this case output shoud be "abc" as abc is not available in File 2. It should not return "erg" by saying it is... (4 Replies)
Hi,
I need to compare two files using shell scripting.
Say like:
File1
AAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCC
eeeeeeeeeeeeeeeeeeeeeeeee
DDDDDDDDDDDDDDDDDDDDDDDDDDDD
File2
BBBBBBBBBBBBBBBBBBBBB
DDDDDDDDDDDDDDDDDDDDDDDDDDDD
AAAAAAAAAAAAAAAAAAAA
... (6 Replies)
Discussion started by: roshParab
6 Replies
LEARN ABOUT DEBIAN
control.ctl
CONTROL.CTL(5) File Formats Manual CONTROL.CTL(5)NAME
control.ctl - specify handling of Usenet control messages
DESCRIPTION
The file /etc/news/control.ctl is used to determine what action is taken when a control message is received. It is read by the parsecon-
trol script, which is called by all the control scripts. (For an explanation of how the control scripts are invoked, see innd(8).)
The file consists of a series of lines; blank lines and lines beginning with a number sign (``#'') are ignored. All other lines consist of
four fields separated by a colon:
message:from:newsgroups:action
The first field is the name of the message for which this line is valid. It should be either the name of the control message, or the word
``all'' to mean that it is valid for all messages.
The second field is a shell-style pattern that matches the email address of the person posting the message. (The poster's address is first
converted to lowercase.) The matching is done using the shell's case statement; see sh (1) for details.
If the control message is ``newgroup'' or ``rmgroup'' then the third field specifies the shell-style pattern that must match the group
being created or removed. If the control message is of a different type, then this field is ignored.
The fourth field specifies what action to take if this line is selected for the message. The following actions are understood:
doit The action requested by the control message should be performed. In most cases the control script will also send mail to usenet.
doifarg
If the control message has an argument, this is treated as a ``doit'' action. If no argument was given, it is treated as a ``mail''
entry. This is used in ``sendsys'' entries script so that a site can request its own newsfeeds(5) entry by posting a ``sendsys
mysite'' article. On the other hand, sendsys ``bombs'' ask that the entire newsfeeds file be sent to a forged reply-to address; by
using ``doifarg'' such messages will not be processed automatically.
doit=file
The action is performed, but a log entry is written to the specified log file, file. If file is the word ``mail'' then the record
is mailed. A null string is equivalent to /dev/null. A pathname that starts with a slash is taken as the absolute filename to use
as the log. All other pathnames are written to /var/log/news/file.log. The log is written by writelog (see newslog(8)).
drop No action is taken; the message is ignored.
log A one-line log notice is sent to standard error. Innd normally directs this to the file /var/log/news/errlog.
log=file
A log entry is written to the specified log file, file, which is interpreted as described above.
mail A mail message is sent to the news administrator.
Lines are matched in order; the last match found in the file is the one that is used. For example, with the following three lines:
newgroup:*:*:drop
newgroup:tale@*.uu.net:comp.*|misc.*|news.*|rec.*|sci.*|soc.*|talk.*:doit
newgroup:kre@munnari.oz.au:aus.*:mail
A newgroup coming from ``tale'' at a UUNET machine will be honored if it is in the mainstream Usenet hierarchy. If ``kre'' posts a new-
group message creating ``aus.foo'', then mail will be sent. All other newgroup messages are ignored.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.8, dated 1996/09/06.
SEE ALSO innd(8), newsfeeds(5), scanlogs(8).
CONTROL.CTL(5)