Sponsored Content
Top Forums Shell Programming and Scripting I want to find the difference between two files, only for the header (column names) Post 302916583 by Praveen Pandit on Thursday 11th of September 2014 12:42:51 AM
Old 09-11-2014
Hi MadeInGermany,

Thanks for your help. I tried your script as well.

It is doing the job like identifying the new column names and giving it in an output file "mismatch.txt" but it is not removing those new columns and its values from the feed.txt, which is still an issue.

Regards
Praveen

Last edited by Praveen Pandit; 09-11-2014 at 03:35 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Column names in flat files

Hi all, I want to create column names in a flat file and then load the data through some other application. For example, I have a file with emp.txt and I need column names as eno,ename,sal in the first line. The delimiter here is comma and record delimiter is end of line or unix new line. Could... (1 Reply)
Discussion started by: srivsn
1 Replies

2. Shell Programming and Scripting

script to compare first column of two files and find difference

Hi, I want to write a script which will compare the 1st column of both the files and will give the difference. e.g:- my 1st file contains: 89 /usr 52 /usr/local 36 /tmp 92 /opt 96 /home 27 /etc/opt/EMCom 1 ... (3 Replies)
Discussion started by: adityam
3 Replies

3. Shell Programming and Scripting

find difference in file column...

Hi All, i have a file that is tab delimited. i need help to find the rows which are having same price based on the site code but some times, there are difference so i need to find only the records which are different in all site code. Dept Sec Barcode 10001 10002 10003 10004... (1 Reply)
Discussion started by: malcomex999
1 Replies

4. Shell Programming and Scripting

Rename a header column by adding another column entry to the header column name URGENT!!

Hi All, I have a file example.csv which looks like this GrpID,TargetID,Signal,Avg_Num CSCH74_1_1,2007,61,256 CSCH74_1_1,212007,647,679 CSCH74_1_1,12007,3,32 CSCH74_1_1,207,299,777 I want the output as GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num CSCH74_1_1,2007,61,256... (4 Replies)
Discussion started by: Vavad
4 Replies

5. UNIX for Dummies Questions & Answers

Rename a header column by adding another column entry to the header column name

Hi All, I have a file example.csv which looks like this GrpID,TargetID,Signal,Avg_Num CSCH74_1_1,2007,61,256 CSCH74_1_1,212007,647,679 CSCH74_1_1,12007,3,32 CSCH74_1_1,207,299,777 I want the output as GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num CSCH74_1_1,2007,61,256... (1 Reply)
Discussion started by: Vavad
1 Replies

6. UNIX for Dummies Questions & Answers

Find the average based on similar names in the first column

I have a table, say this: name1 num1 num2 num3 num4 name2 num5 num6 num7 num8 name3 num1 num3 num4 num9 name2 num8 num9 num1 num2 name2 num4 num5 num6 num4 name4 num4 num5 num7 num8 name5 num1 num3 num9 num7 name5 num6 num8 num3 num4 I want a code that will sort my data according... (4 Replies)
Discussion started by: FelipeAd
4 Replies

7. Shell Programming and Scripting

Script to find difference between 2 files by column

Hi , i am newbie to shell scripting and am trying to do the below job, A shell script to be run with a command like sh Compare.ksh file1.txt file2.txt 1 2 > file3.txt 1 2-are the key columns Consider the delimiter would be Tab or comma File 1: SK TEST NAME MATHS PHYSICS 21 1... (1 Reply)
Discussion started by: shakthi666
1 Replies

8. Homework & Coursework Questions

Script to find difference between 2 files by column

Hi , i am newbie to shell scripting and am trying to do the below job, A shell script to be run with a command like sh Compare.ksh file1.txt file2.txt 1 2 > file3.txt 1 2-are the key columns Consider the delimiter would be Tab or comma File 1: SK TEST NAME MATHS PHYSICS 21 1 AAA... (1 Reply)
Discussion started by: shakthi666
1 Replies

9. Shell Programming and Scripting

How to get difference of the same column between two files when other column matches?

File 1: 20130416,235800,10.78.25.104,BR2-loc,60.0,1624,50.0,0,50.0,0 20130416,235800,10.78.25.104,BR1-LOC,70.0,10,50.0,0,70.0,0 20130416,235800,10.78.25.104,Hub_None,60.0,15,60.0,0,50.0,0 File 2: 20130417,000200,10.78.25.104,BR2-loc,60.0,1626,50.0,0,50.0,0... (3 Replies)
Discussion started by: Lakshmikumari
3 Replies

10. Shell Programming and Scripting

Prefix a variable in the first column of all the records of the files with and without header

In a bash shell, I have to prefix a variable to two .CSV files File1.CSV and File2.CSV. One of the files has a header and the other one is with no header in the below format: "value11","value12","value13","value14","value15","value16" "value21","value22","value23","value24","value25","value26"... (7 Replies)
Discussion started by: dhruuv369
7 Replies
ECACCESS-JOB-SUBMIT(1p) 				User Contributed Perl Documentation				   ECACCESS-JOB-SUBMIT(1p)

NAME
ecaccess-job-submit - Submit a new ECaccess Job SYNOPSIS
ecaccess-job-submit -version|-help|-manual ecaccess-job-submit [-debug] [-distant] [-encrypt] [-bufsize length] [-scheduledDate date] [-noDirectives] [-gateway name] [-remote location] [-transferOutput] [-transferError] [-transferInput] [-keep] [-eventIds list] [-sterr2Stdout] [-noRenew] [-mailTo email] [-onStart] [-onSuccess] [-onFailure] [-onRetry] [-jobName name] [-manPage content] [-lifeTime days] [-retryCount number] [-retryFrequency frequency] [-queueName name] source DESCRIPTION
Allow submitting the source script on either the default ECaccess batch queue or the ECaccess batch queue specified with the -queueName option. ECaccess batch queue name can be obtained with the ecaccess-queue-list command (the default queue is the first in the list). A special service (see option -eventIds) allows to automatically submit jobs to be run when certain points in the daily ECMWF operational forecast suite have been reached. The main purpose is to ensure that certain data is available before e.g. submitting a MARS request. These events correspond to the different stages when the ECMWF operational activity has produced certain data or products. The list of events can be retrieved with the ecaccess-event-list command. In order to facilitate the migration from the old ECtools (ecjreq/ecjput commands) the equivalents options can be set using their old names (e.g. -at for -scheduledDate). This should limit the scripts modifications for job submissions. ARGUMENTS
source The name of the file which contains the job input script (depending of the -distant option this file is either at ECMWF or local to your workstation). OPTIONS
-distant By default the source is specifying a file which is local to your workstation. Using this option allow submitting a script which is already at ECMWF. -encrypt By default the source file is uploaded through the plain text channel (http). Using this option will force the upload to occurs through the SSL secure channel (https). This option only apply for local scripts (no -distant). -bufsize length Specify the length of the buffer (in bytes) which is used to upload the file. The larger the buffer the smaller the number of http/s requests. By default a buffer of 524288 bytes(512KB) is used. This option only apply for local scripts (no -distant). -at, -scheduledDate date Allow specifying the start date for the Job. By default the job will start as soon as possible. The format for the date is 'yyyy-MM-dd HH:mm'. -nd, -noDirectives Allow submitting a job with no scheduler directives. Some default directives will be added to your input script to allow processing the job. -tg, -gateway name This is the name of the target ECaccess Gateway for the transfers. It is by default the Gateway you are connected to. In order to get the name of your current Gateway you can use the ecaccess-gateway-name command. When using the commands at ECMWF the default Gateway is always "ecaccess.ecmwf.int". -tr, -remote location Defines the target ECtrans location in the format association-name[@protocol]. -to, -transferOutput Request the transfer of the job standard output to the gateway and remote location defined in the -gateway and -remote options. -te, -transferError Request the transfer of the job error output to the gateway and remote location defined in the -gateway and -remote options. -ti, -transferInput Request the transfer of the job input to the gateway and remote location defined in the -gateway and -remote options. -tk, -keep Allow keeping the transfers requests in the spool. -ni, -eventIds list Allow giving a list of event-identifiers to subscribe to with the Job. The list should be separated by ';' or ','. -eo, -sterr2Stdout Force redirection of the job standard error output (stderr) to the job standard output (stdout). -ro, -noRenew The job subscriptions to events will not be renewed. -mu, -mailTo email Defines the target email address (default: current ECMWF user identifier). -mb, -onStart Allow sending a mail when the execution/transfer begins. -me, -onSuccess Allow sending a mail when the execution/transfer ends. -mf, -onFailure Allow sending a mail when the execution/transfer fails. -mr, -onRetry Allow sending a mail when the execution/transfer retries. -queueName name The name of the ECaccess batch queue to submit the job to. -jn, -jobName name Allow specifying a name for the new Job (other than the Job Identifier). -mp, -manPage content Allow giving the man page content which will be displayed to the ECMWF operators in case of problems with your Job (e.g. what to do or who to contact). -lt, -lifeTime days Allow specifying the job input/output life time in days. The default is 7 days. -rc, -retryCount number Defines the number of retries. The default is 0. -rf, -retryFrequency frequency Defines the frequency of retries in seconds. The default is 600 seconds. -version Display version number and exits. -help Print a brief help message and exits. -manual Prints the manual page and exits. -debug Display the SOAP messages exchanged. EXAMPLES
ecaccess-job-submit -noDirectives ./test.txt Transfer the local file test.txt to your ECMWF spool and submit the job to the default ECaccess batch queue. The source does not have any directives. SEE ALSO
ecaccess-queue-list, ecaccess-event-list, ecaccess-job-delete, ecaccess-job-get, ecaccess-job-list ecaccess-job-restart and ecaccess. perl v5.14.2 2012-04-16 ECACCESS-JOB-SUBMIT(1p)
All times are GMT -4. The time now is 10:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy