Sponsored Content
Full Discussion: Script to compare lines
Top Forums Shell Programming and Scripting Script to compare lines Post 302278949 by init0 on Wednesday 21st of January 2009 03:58:56 PM
Old 01-21-2009
syntax error: `result$=' unexpected

Thanks for the reply but I keep getting this error when I run it ?

syntax error: `result$=' unexpected
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to compare lines in 2 files

Hello, I am new to scripting and need some help. In looking at other posts on this forum, I came up with the following logic. I cannot figure out why I am getting names of files of the current directory in my echo output. Scenario: message file has a line containing the version. Version.txt... (2 Replies)
Discussion started by: brdholman
2 Replies

2. Shell Programming and Scripting

Help! How to compare two lines in a file

Hello, I am newcomer and sorry for this simple question. I want to how to compare two lines in a file? For example, to compare the first line and the second line of a file to know if they are same? Thanks in advance! Leon (3 Replies)
Discussion started by: sabertooth2000
3 Replies

3. Shell Programming and Scripting

Compare lines and execute

Greetings, I'm new to scripting and need a little help. I have a NAS server and want to make a script that bans IP if they fail login several times. The problem is that I dont know how to compare the IP's in the file. If they exist more than 3 times do .... #!/bin/sh set -x X=4 rm... (2 Replies)
Discussion started by: ntenz
2 Replies

4. Shell Programming and Scripting

how to compare two lines using shell script?

how to compare two lines using shell script? (1 Reply)
Discussion started by: suman_dba1
1 Replies

5. Shell Programming and Scripting

Compare lines within a file

could someone write a short script which is able to take a text file input and compare lines 1 and 2, 3 and 4, 5 and 6 ... ... until the end of the file. And to prompt if the lines are not equal. Thank you! (10 Replies)
Discussion started by: c_lady
10 Replies

6. Shell Programming and Scripting

compare lines in a file

Hi Folks, I need to compare the cron's timings from a text file. Need to display how much time does it took for that job. For example i have the below txt file, I have cron1 started at 05:23:15 and completed at 05:25:57, now i need to find how much time did it took to complete corn1 job for... (8 Replies)
Discussion started by: Sendhil.Kumaran
8 Replies

7. Shell Programming and Scripting

How to compare two lines in a csv file using shell script?

I have a file lets say input.csv having two columns like- Name,Mobile No A,111 B,222 A,333 A,123 B,213 I would like to find result in a new file lets say output.csv as- Name,Mobile No A,111 B,222 means short the file on the basis of first column and first value corresponding to the... (5 Replies)
Discussion started by: Ashish Singhal
5 Replies

8. Shell Programming and Scripting

Script to compare lines in a file

Need help to create the script that does the following : - 1. Compare the current line "column B and C" with next line "column B and C" 2. If they are the same, print output to a file Input file 2014-08-25 04:45:56.673|T1|JO|Begin|10 2014-08-25 04:55:56.673|T1|JO|Begin|11 2014-08-25... (8 Replies)
Discussion started by: chailee
8 Replies

9. UNIX for Dummies Questions & Answers

Compare lines in 2 files

I have 2 files with exactly the same information (with header and separated by ";") and what I would like to do is print (for both files!) the columns that are different and also print the "key" column that is equal in the 2 files For example, if File1: key1;aaa;bbb;ccc key2;ddd;eee;fff... (4 Replies)
Discussion started by: mvalonso
4 Replies

10. Shell Programming and Scripting

Compare lines between two files

I have two files I need to compare these two files and take the lines that are common in both the files and consider the line present in second file for my further processing I have used "Awk" along with "FNR and NR" but that is not working gawk -F= ' > FNR==NR {a=$1; next}; > ... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
PMPARSEINTERVAL(3)					     Library Functions Manual						PMPARSEINTERVAL(3)

NAME
pmParseInterval - convert interval string to timeval structure C SYNOPSIS
#include <pcp/pmapi.h> int pmParseInterval(const char *string, struct timeval *rslt, char **errmsg); cc ... -lpcp DESCRIPTION
pmParseInterval parses the argument string specifying an interval of time and fills in the tv_sec and tv_usec components of the rslt struc- ture to represent that interval. The input string is most commonly the argument following a -t command line option to a PCP application, and the syntax is fully described in PCPIntro(1). pmParseInterval returns 0 and errmsg is undefined if the parsing is successful. If the given string does not conform to the required syntax pmParseInterval returns -1 and a dynamically allocated error message string in errmsg. The error message is terminated with a newline and includes the text of the input string along with an indicator of the position at which the error was detected, e.g. 4minutes 30mumble ^ -- unexpected value In the case of an error, the caller is responsible for calling free(3C) to release the space allocated for errmsg. SEE ALSO
PMAPI(3) and pmParseTimeWindow(3). Performance Co-Pilot PCP PMPARSEINTERVAL(3)
All times are GMT -4. The time now is 05:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy