Thanks pamu its working will you please explain..suppose files contains different number of columns say file1.txt contains 5 columns reference.txt contains 10 columns then
, won't help I think
Yes it won't work in that case. Because our matching criteria as $0 itself won't work here.
As per our matching pattern we can have arrays. Assume column 1 and 2 from file1.txt and column 2 and 5 from reference.txt. and print file1.txt.
Then we can use sth like this..
Good morning everybody,
Beeing an absolute newbie in shell scripting I would like to look for some help here.
I would like to read an external text file and format the data and write it to an output file.
What I was trying to do was to display the result (this worked).
But now I... (1 Reply)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Hello,
How can I run this script every 1 hour and save its result to result.txt
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
Regards
Shaan (5 Replies)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Hi Guys,
I wanted to compare a delimited file and positional file, for a particular key files and if it matches then append the positional file with some data.
Example:
Delimited File
--------------
Byer;Amy;NONE1;A5218257;E5218257
Byer;Amy;NONE1;A5218260;E5218260
Positional File... (3 Replies)
Hi Gurus,
I have requirement to compare current result with previous reuslt.
The sample case is below.
1 job1 1
1 job2 2
1 job3 3
2 job_a1 1
2 job_a2 2
2 job_a3 3
3 job_b1 1
3 job_b2 2
for above sample file, GID is group ID, for input line, the job run... (1 Reply)
HI,
I have 2 text files. file1 and file2.
file1.txt (There are no duplicates in this file)
1234
3232
4343
3435
6564
6767
1213
file2.txt
1234,wq,wewe,qwqw
1234,as,dfdf,dfdf
4343,asas,sdds,dsds
6767,asas,fdfd,fdffd
I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
Hi Linux Experts.
I have a requirement where i need to update the thousands of table definitions to extend the column length and character set therefore i am looking for some sort of linux script which i can use to update the length and chacterset.
I have two files
In first file i have 7... (1 Reply)
Hello Unix gurus,
I have a file with this format (example values):
label1 1 0
label2 1 0
label3 0.4 0.6
label4 0.5 0.5
label5 0.1 0.9
label6 0.9 0.1
in which:
column 1 is a row label
column 2 and 3 are values
I would like to do a simple operation on this table and get the... (8 Replies)
I have the following script,
for i in $(cat MyWebApps); do curl -u manager:tH1s1s4f3k3p4ssw0Rd http://10.10.10.10:7529/manager/jmxproxy/"?get=Catalina:type=Manager,context=/$i,host=localhost&att=activeSessions"; done
Which gives me an output like this
OK - Attribute get... (12 Replies)
Discussion started by: charli1
12 Replies
LEARN ABOUT DEBIAN
sc_warts2text
SC_WARTS2TEXT(1) BSD General Commands Manual SC_WARTS2TEXT(1)NAME
sc_warts2text -- simple dump of information contained in a warts file.
SYNOPSIS
sc_warts2text [-d ip2descr-file] [file ...]
DESCRIPTION
The sc_warts2text utility provides a simple dump of information contained in a sequence of warts files. The output is the same as that which
would have been provided by scamper if the text output option had been chosen instead of the warts output option when the data was collected.
The options are as follows:
-d ip2descr-file
specifies the name of a file with IP-address, description mappings, one mapping per line. See the examples section for further
information.
While the output of sc_warts2text is structured and suitable for initial analyses of results, the format of the output is not suitable for
automated parsing and analysis as the output of sc_warts2text will change overtime with no regard to backwards compatibility. Analyses of
the contents of a warts file should be made using specialised programs which link against the scamper file API.
EXAMPLES
The command:
sc_warts2text file1.warts file2.warts
will decode and print the contents of file1.warts, followed by the contents of file2.warts.
The command:
gzcat file1.warts.gz | sc_warts2text
will print the contents of the uncompressed file supplied on stdin.
Given a set of IP-address, description pairs in a file name mappings.txt:
192.0.2.1 "foo"
192.0.2.2 "bar"
then the command gzcat file1.warts.gz | sc_warts2text -d mappings.txt will print the description associated with a given destination address
before each result is presented.
SEE ALSO scamper(1), sc_wartsdump(1)AUTHORS
sc_warts2text is written by Matthew Luckie <mjl@luckie.org.nz>.
BSD October 15, 2010 BSD