Experts and Informed folks,
Need some help here in parsing the log file.
HTML Code:
1389675 Opera_ShirtCatalog INSERT INTO Opera_ShirtCatalog(COL1, COL2) VALUES (1, 'TEST1'), (2,'TEST2');
1389685 Opera_ShirtCatlog_Wom INSERT INTO Opera_ShirtCatlog_Wom(col1, col2, col3) VALUES (9,'Siz12, FormFit', 'Test');
Now, I need to print the rest of
Hi All,
I got stuck up with shell script where i use awk. The scenario which i am working on is as below.
more report2.txt
Quote:
col1
col2
col3
col4
.
.
coln
how to modify the AWK to print above out put for given n no of inputs using report2.txt file?
out put should be
Quote:
A.col1=B.col1 and
A.col2 = B.col2 and
A.col3 = B.col3.
..
..
A.coln= B.coln where
Hi All,
i have a CSV file like below,
col1 col2 col3 col4 col5 col6 col7
a1 a2 a3 a4 a5 a6 a7
b1 b2 b3 b4 b5 b6 b7
c1 c2 c3 c4 c5 c6 c7
d1 d2 d3 d4 d5 d6 d7
Col1,col2.. are the column names and a1,a2,b1,b2..
So say you have something like:
Code:
col1 col2 col3
. . .
. . .
Say using bash you want the columns to always have exactly the same width (including spaces).
I have a file with this structure:
ma${token}jid-azimi-865131021
javad-ya${token}rip-865132012
and here is my program:
IFS="-"
token="12345678"
cat input.txt | while read col1 col2 col3; do
echo ${col1}
echo ${col2}
echo ${col3}
echo "********************************"
done
I want to insert ${token} while reading file.
Hello All,
I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B.
Note that my data has some other columns(not shown here) too (around 100) after col2.
Code:
Tool,Data
A,1
A,3
A,5
....
so on
B,2
B,4
....
so on
I want to convert all odd numbers to even numbers( adding 1)..
I have an input file with contents in the following format:
ABCD XYZAB 1234
PQRSTUV STU SKIP
LMN OPRQM 8966
RSTUV OPM SKIP
TUV ZXU SKIP
I want to parse this file and output it to a new file such that, rows with their last column as "SKIP" do not appear in the final output file, as below:
ABCD XYZAB 1234
LMN OPRQM 8966
To process the above, I wro
Hi,
I need to compare multiple columns from 2 files.
I can, for example, have these 2 files:
file1:
Code:
col1, col2, col3,col4
a,1,4,7
b,2,5,8
c,3,6,9
file2:
Code:
col1, col2, col3,col4
a,2,3,2
b,5,7,5
c,1,9,8
As a result, I need for example the difference between the columns 2 and 4:
Code:
col2, col4
1,-5
3,-3
-2,-1
I made something that works for comparing 1 column, but I w