03-05-2013
#!/bin/bash
$awk -F, 'NR==FNR{for(i=1;i<=NF;i++){A[i,NR]=$i}next}
{for(i=1;i<=NF;i++){if(A[i,FNR]!=$i){print "Line",NR,";Field",i,"diff value",A[i,FNR]"="$i}}}' taxdetails.csv RC023_test.csv
i am using this in script and named it as Diff.sh
but when i run this script it is giving error as
rwxd256:dotisdm1:/opt/DataMigration/data/NKARING: $ Diff.sh
Diff.sh: line 2: -F,: command not found
rwxd256:dotisdm1:/opt/DataMigration/data/NKARING: $
I am new to unix please help
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Am new to scripting. So i just need your ideas to help me out. Here goes my requirement.
I have two csv files
1.csv 2.csv
abc,1.24 abc,1
def,2.13 def,1
I need to compare the first column of 1.csv with 2.csv and if matches then need to compare... (2 Replies)
Discussion started by: chinnahyd
2 Replies
2. Shell Programming and Scripting
Hello,
I have two files file1 & file2 containing both lines (1 word per line). I need to extract the lines that are in file1 and not present in file2 and have the result in output file.
i.e :
user>cat file1
line1
line2
line3
line4
line5
user>cat file2
line1
line3
line5
The... (2 Replies)
Discussion started by: newpromo
2 Replies
3. Shell Programming and Scripting
Hi Freinds
I have two .txt file gem1.txt and gem2.txt,
Sample gem1.txt
abstract (1.0.0)
actionmailer (2.3.5, 2.2.2)
actionpack (2.3.5, 2.2.2)
activerecord (2.3.5, 2.2.2)
activerecord-oracle_enhanced-adapter (1.1.9)
activerecord-sqlserver-adapter (2.3.4)
activeresource (2.3.5, 2.2.2)... (3 Replies)
Discussion started by: ankit_view24
3 Replies
4. Shell Programming and Scripting
It seems like a common task, but I haven't been able to find the solution.
vitallog.txt
1310,John,Hancock
13211,Steven,Mills
122,Jane,Doe
138,Thoms,Doe
1500,Micheal,May
vitalinfo.txt
12122,Jane,Thomas
122,Janes,Does
123,Paul,Kite
**OUTPUT**
vitalfiltered.txt
12122,Jane,Thomas... (2 Replies)
Discussion started by: charles33
2 Replies
5. Shell Programming and Scripting
Hi Friends,
Need Help. I have file1.txt as
File1.txt
|123|A|7267|Hyder|Cross|Sell|7801
|995|A|7051|2008|Lunar|New|Year|Promotion|7801
|996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801
|997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801
File2.txt... (7 Replies)
Discussion started by: i150371485
7 Replies
6. Shell Programming and Scripting
Hi Freinds,
I have 2 files . one is source.txt and second one is target.txt. I want to keep source.txt as baseline and compare target.txt. please find the data in 2 files and Expected output.
Source.txt
1|HYD|NAG|TRA|34.5|1234
2|CHE|ESW|DES|36.5|134
3|BAN|MEH|TRA|33.5|234... (5 Replies)
Discussion started by: i150371485
5 Replies
7. Shell Programming and Scripting
(say) I have 2 csv files - file1.csv & file2.csv as mentioned below:
file1.csv
ID,version,cost
1000,1,30
2000,2,40
3000,3,50
4000,4,60
file2.csv
ID,version,cost
1000,1,30
2000,2,45
3000,4,55
6000,5,70
... (1 Reply)
Discussion started by: Naresh101
1 Replies
8. Shell Programming and Scripting
(say) I have 2 csv files - file1.csv & file2.csv as mentioned below:
file1.csv
ID,version,cost
1000,1,30
2000,2,40
3000,3,50
4000,4,60
file2.csv
ID,version,cost
1000,1,30
2000,2,45
3000,4,55
6000,5,70
The... (7 Replies)
Discussion started by: Naresh101
7 Replies
9. Shell Programming and Scripting
Hi,
I have a file of csv data, which looks like this:
file1:
1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628
2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Discussion started by: djoseph
10 Replies
10. Shell Programming and Scripting
Hi, I am newbie in shell script.
I need your help to solve my problem.
Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file.
File1:
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies
LEARN ABOUT DEBIAN
apsfilter-bug
APSFILTER-BUG(1) BSD General Commands Manual APSFILTER-BUG(1)
NAME
apsfilter-bug -- create a half-automatic bug report for apsfilter
SYNOPSIS
apsfilter-bug
OPTIONS
none
DESCRIPTION
With the apsfilter-bug script you can automatically create a bug report for apsfilter(1). A template report file is created which you can
edit with your favourite editor ( emacs(1) by default, or whatever is entered in the environment variable EDITOR ).
You will see a couple of lines starting with '#'; these lines will be removed before the report is sent. So if you want to use the '#' char-
acter at the beginning of a line, just indent it with a space.
A very important piece of the bug report is the debugging log created by aps2file(1), probably with a command like
aps2file -D -o /dev/null [-P...] [-Z...] [input] 2> log.txt
Unless you don't even have a chance to create a debugging log, it is crucial for serious bug hunting.
After you have filled in as much (useful) information as possible, you must save the file under its original name, then exit your editor.
If you invoked apsfilter-bug by accident, or if you need some additional system information to include into the bug report, just exit your
editor without saving the file.
NOTES
In addition to the stuff you've edited, some more information is appended to the bug report automatically:
apsfilter version 7.2.6-stable
ghostscript version (from 'gs --version')
system id (from 'uname -a')
configure options --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-awk=/usr/bin/awk --with-sendmail=/usr/sbin/sendmail
shell executable /bin/bash
awk executable /usr/bin/awk
sendmail executable /usr/sbin/sendmail
FILES
/usr/bin/aps2file script to create debugging output
SEE ALSO
apsfilter(1), aps2file(1)
BUGS
See apsfilter software center - http://www.apsfilter.org/ - for new versions, bugfixes and known bugs.
Please use the new tool apsfilter-bug(1) to release bug- or problem reports. It automatically presents you a form in an editor window which
asks you some standard questions. If you save and quit the editor session, then this report is sent automatically via e-mail to the proper
apsfilter mailinglist.
If apsfilter fails to print something or prints it in a way you wouldn't expect and you want to report an apsfilter error then please save
the debugging output of one print session using the new aps2file(1) utility by typing aps2file -D -Z options file > /dev/null 2> file.debug
and including the debugging output in the file file.debug into the edit session of the apsfilter-bug utility, so that it is included into the
mail to the apsfilter mailinglist.
Please note that you need to run /bin/sh (Bourne Shell), bash or a compatible shell, so that the above mentioned output redirection works.
Under C-shell (/bin/csh) or tcsh it would't work. If you don't know, then simply make sure you use the Bournce shell by typing /bin/sh or
bash, then you should have no problems with redirection of stdout and stderr (> /dev/null 2> file.debug).
DOCUMENTATION
See official apsfilter homepage
http://www.apsfilter.org/handbook.html Apsfilter Handbook including the Frequently Asked Questions (FAQ)
USER FORUM
Please send questions to the official apsfilter help channel apsfilter-help@apsfilter.org. The above section BUGS and the file
HOWTO-BUGREPORTS tells you how to report bugs. If you want to know how to troubleshoot your apsfilter installation, please read the manpage
aps2file(1) and apsfilter-bug(1) as well as the Apsfilter Handbook carefully.
HISTORY
The apsfilter-bug manpage has been written by Michael LoBin <phallobst@web.de> and first appeared in apsfilter V 7.1.0.
BSD
Dec 26, 2001 BSD