Sponsored Content
Top Forums Shell Programming and Scripting Grep the nearest value from a csv file to another Post 302576530 by prince1987 on Friday 25th of November 2011 06:13:48 AM
Old 11-25-2011
Could you please let us know the closest value?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Urgent help on grep the nearest value

Hi, I have a list of data in text files with :- ColA ColB ColC ColD ColE ColF 12 122 2280 30 0.012987 1.776 13 118 2280 30 0.012987 1.954 14 115 2620 30 0.011321 2.131 15 113 2654 30 0.011177 2.309 16 145 1882 25 0.013110 2.487 17 112... (2 Replies)
Discussion started by: ahjiefreak
2 Replies

2. Shell Programming and Scripting

merge file with nearest range !!!!!!!

I want join 2 files with range of numbers in ascending order according to the value of the numbers the input will be like this INPUT file1 column1 column2 10 14 20 25 56 58 83 90 FILE 2 column1 column 2 1 2 2 8... (15 Replies)
Discussion started by: bogu0001
15 Replies

3. Shell Programming and Scripting

Script to Grep column 3 from csv file generated yesterday

Hello, Can any one please assist how to scirpt it: Every day a new log file is create and I want to process only the one generated yesterday and get the data of column 3 and 6. For example today's date is 24 then I want to get the data of log file created on 23rd. Log Files in... (7 Replies)
Discussion started by: sureshcisco
7 Replies

4. Shell Programming and Scripting

Use grep sed or awk to extract string from log file and put into CSV

I'd like to copy strings from a log file and put them into a CSV. The strings could be on different line numbers, depending on size of log. Example Log File: File = foo.bat Date = 11/11/11 User = Foo Bar Size = 1024 ... CSV should look like: "foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies

5. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

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

6. Shell Programming and Scripting

Save output of updated csv file as csv file itself, part 2

Hi, I have another problem. I want to sort another csv file by the first field. result.csv SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw /home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies

7. Shell Programming and Scripting

Match and Grep the nearest value in last field

Gents I have this input file file1 (uniq records) 54503207851 170211240 54503207911 170210837 54503208111 170215105 54503208112 170215210 54655210011 170223140 54655210091 170223738 54655210172 170224355 54655210251 170224741 54655210331 170225039 54655210411 170225505 54655210492... (13 Replies)
Discussion started by: jiam912
13 Replies

8. Shell Programming and Scripting

Checking File record equal to multiple of 70 or nearest number to multiple of 70

Hello, I have a file with below content - Example 3 6 69 139 210 345 395 418 490 492 I would like the result as - Multiple of 70 or nearest number in the file less than the multiple of 70 69 139 (5 Replies)
Discussion started by: Mannu2525
5 Replies

9. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
SD_JOURNAL_SEEK_HEAD(3) 				       sd_journal_seek_head					   SD_JOURNAL_SEEK_HEAD(3)

NAME
sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor - Seek to a position in the journal SYNOPSIS
#include <systemd/sd-journal.h> int sd_journal_seek_head(sd_journal* j); int sd_journal_seek_tail(sd_journal* j); int sd_journal_seek_monotonic_usec(sd_journal* j, sd_id128_t boot_id, uint64_t usec); int sd_journal_seek_realtime_usec(sd_journal* j, uint64_t usec); int sd_journal_seek_cursor(sd_journal* j, const char * cursor); DESCRIPTION
sd_journal_seek_head() seeks to the beginning of the journal, i.e. the oldest available entry. Similarly, sd_journal_seek_tail() may be used to seek to the end of the journal, i.e. the most recent available entry. sd_journal_seek_monotonic_usec() seeks to the entry with the specified monotonic timestamp, i.e. CLOCK_MONOTONIC. Since monotonic time restarts on every reboot a boot ID needs to be specified as well. sd_journal_seek_realtime_usec() seeks to the entry with the specified realtime (wallclock) timestamp, i.e. CLOCK_REALTIME. Note that the realtime clock is not necessarily monotonic. If a realtime timestamp is ambiguous, it is not defined which position is sought to. sd_journal_seek_cursor() seeks to the entry located at the specified cursor string. For details on cursors, see sd_journal_get_cursor(3). If no entry matching the specified cursor is found the call will seek to the next closest entry (in terms of time) instead. To verify whether the newly selected entry actually matches the cursor, use sd_journal_test_cursor(3). Note that these calls do not actually make any entry the new current entry, this needs to be done in a separate step with a subsequent sd_journal_next(3) invocation (or a similar call). Only then, entry data may be retrieved via sd_journal_get_data(3). If no entry exists that matches exactly the specified seek address, the next closest is sought to. If sd_journal_next(3) is used, the closest following entry will be sought to, if sd_journal_previous(3) is used the closest preceding entry is sought to. RETURN VALUE
The functions return 0 on success or a negative errno-style error code. NOTES
The sd_journal_seek_head(), sd_journal_seek_tail(), sd_journal_seek_monotonic_usec(), sd_journal_seek_realtime_usec(), and sd_journal_seek_cursor() interfaces are available as a shared library, which can be compiled and linked to with the libsystemd-journal pkg- config(1) file. SEE ALSO
systemd(1), sd-journal(3), sd_journal_open(3), sd_journal_next(3), sd_journal_get_data(3), sd_journal_get_cursor(3), sd_journal_get_realtime_usec(3) systemd 208 SD_JOURNAL_SEEK_HEAD(3)
All times are GMT -4. The time now is 11:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy