Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Sort by record column, Compare with conditons and export the result Post 303013325 by Kesavan on Monday 19th of February 2018 04:04:42 PM
Old 02-19-2018
hello Usagi,
provide contents of the file you want to process and also tell us a little bit about what you have tried already.
Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find common lines using just one column to compare and result with all columns

Hi. If we have this file A B C 7 8 9 1 2 10 and this other file A C D F 7 9 2 3 9 2 3 4 The result i´m looking for is intersection with A B C D F so the answer here will be (10 Replies)
Discussion started by: alcalina
10 Replies

2. Shell Programming and Scripting

Compare to files and export only different values

Hello, I need to compare two files which have the following structure File1: No : 1 Name : George/Brown Value2 : type2 Value3 : type3 Date : Wed Oct 20 11:12:58 2010 Value : yes No : 2 Name : John/Cash Value2 :... (4 Replies)
Discussion started by: @dagio
4 Replies

3. Shell Programming and Scripting

start searching a word from the particular record on the result of first occurence change the value

Hi, I need a script to start searching a word from the particular record on the result of first occurence i need to change the value in that record. I have a input file like this <properties> <add key="DeliveryWithinDay" value="False" /> <add key="ABC" value="23:00:00 PM" /> <add... (5 Replies)
Discussion started by: NareshN
5 Replies

4. UNIX for Advanced & Expert Users

How to export Result to Excel Tabular format from UNIX?

Hi I am working on a script in which I am firing a query on database through Unix and getting the result set. I want to export that in an excel file. I am able to do so nut the result are exported horizontally one below the other. Can anyone plss help me out in exporting the Result in Tabular... (4 Replies)
Discussion started by: Saritau3
4 Replies

5. Shell Programming and Scripting

How to compare current record,with next and previous record in awk without using array?

Hi! all can any one tell me how to compare current record of column with next and previous record in awk without using array my case is like this input.txt 0 32 1 26 2 27 3 34 4 26 5 25 6 24 9 23 0 32 1 28 2 15 3 26 4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies

6. Shell Programming and Scripting

Problem facing to compare different column and print out record with smallest number

Hi, Input file 1 : 37170 37196 77 51 37174 37195 73 52 37174 37194 73 53 Desired Output file 1 : 37170 37196 77 51 Input file 2 : 37174 37195 73 0 37170 37196 77 0 Desired Output file 2 : 37174 37195 73 0 (1 Reply)
Discussion started by: cpp_beginner
1 Replies

7. UNIX for Dummies Questions & Answers

Match sum of values in each column with the corresponding column value present in trailer record

Hi All, I have a requirement where I need to find sum of values from column D through O present in a CSV file and check whether the sum of each Individual column matches with the value present for that corresponding column present in the trailer record. For example, let's assume for column D... (9 Replies)
Discussion started by: tpk
9 Replies

8. Shell Programming and Scripting

How to compare the current result with previous line result.?

Hi Gurus, I have requirement to compare current result with previous reuslt. The sample case is below. 1 job1 1 1 job2 2 1 job3 3 2 job_a1 1 2 job_a2 2 2 job_a3 3 3 job_b1 1 3 job_b2 2 for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies

9. Shell Programming and Scripting

Split column data if the table has n number of column's with some record

Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records Table --------- Col1 col2 col3 col4 ....................col20 1 2 3 4 .................... 20 a b c d .................... v ... (11 Replies)
Discussion started by: Priti2277
11 Replies

10. UNIX for Beginners Questions & Answers

Add column and multiply its result to all elements of another column

Input file is as follows: 1 | 6 2 | 7 3 | 8 4 | 9 5 | 10 Output reuired (sum of the first column $1*$2) 1 | 6 | 90 2 | 7 | 105 3 | 8 | 120 4 |9 | 135 5 |10 | 150 Please enclose sample input, sample output, and code... (5 Replies)
Discussion started by: Sagar Singh
5 Replies
MODIFY_LDT(2)						     Linux Programmer's Manual						     MODIFY_LDT(2)

NAME
modify_ldt - get or set a per-process LDT entry SYNOPSIS
#include <sys/types.h> int modify_ldt(int func, void *ptr, unsigned long bytecount); Note: There is no glibc wrapper for this system call; see NOTES. DESCRIPTION
modify_ldt() reads or writes the local descriptor table (LDT) for a process. The LDT is an array of segment descriptors that can be refer- enced by user code. Linux allows processes to configure a per-process (actually per-mm) LDT. For more information about the LDT, see the Intel Software Developer's Manual or the AMD Architecture Programming Manual. When func is 0, modify_ldt() reads the LDT into the memory pointed to by ptr. The number of bytes read is the smaller of bytecount and the actual size of the LDT, although the kernel may act as though the LDT is padded with additional trailing zero bytes. On success, mod- ify_ldt() will return the number of bytes read. When func is 1 or 0x11, modify_ldt() modifies the LDT entry indicated by ptr->entry_number. ptr points to a user_desc structure and byte- count must equal the size of this structure. The user_desc structure is defined in <asm/ldt.h> as: struct user_desc { unsigned int entry_number; unsigned long base_addr; unsigned int limit; unsigned int seg_32bit:1; unsigned int contents:2; unsigned int read_exec_only:1; unsigned int limit_in_pages:1; unsigned int seg_not_present:1; unsigned int useable:1; }; In Linux 2.4 and earlier, this structure was named modify_ldt_ldt_s. The contents field is the segment type (data, expand-down data, non-conforming code, or conforming code). The other fields match their descriptions in the CPU manual, although modify_ldt() cannot set the hardware-defined "accessed" bit described in the CPU manual. A user_desc is considered "empty" if read_exec_only and seg_not_present are set to 1 and all of the other fields are 0. An LDT entry can be cleared by setting it to an "empty" user_desc or, if func is 1, by setting both base and limit to 0. A conforming code segment (i.e., one with contents==3) will be rejected if func is 1 or if seg_not_present is 0. When func is 2, modify_ldt() will read zeros. This appears to be a leftover from Linux 2.4. RETURN VALUE
On success, modify_ldt() returns either the actual number of bytes read (for reading) or 0 (for writing). On failure, modify_ldt() returns -1 and sets errno to indicate the error. ERRORS
EFAULT ptr points outside the address space. EINVAL ptr is 0, or func is 1 and bytecount is not equal to the size of the structure user_desc, or func is 1 or 0x11 and the new LDT entry has invalid values. ENOSYS func is neither 0, 1, 2, nor 0x11. CONFORMING TO
This call is Linux-specific and should not be used in programs intended to be portable. NOTES
Glibc does not provide a wrapper for this system call; call it using syscall(2). modify_ldt() should not be used for thread-local storage, as it slows down context switches and only supports a limited number of threads. Threading libraries should use set_thread_area(2) or arch_prctl(2) instead, except on extremely old kernels that do not support those sys- tem calls. The normal use for modify_ldt() is to run legacy 16-bit or segmented 32-bit code. Not all kernels allow 16-bit segments to be installed, however. Even on 64-bit kernels, modify_ldt() cannot be used to create a long mode (i.e., 64-bit) code segment. The undocumented field "lm" in user_desc is not useful, and, despite its name, does not result in a long mode segment. BUGS
On 64-bit kernels before Linux 3.19, setting the "lm" bit in user_desc prevents the descriptor from being considered empty. Keep in mind that the "lm" bit does not exist in the 32-bit headers, but these buggy kernels will still notice the bit even when set in a 32-bit process. SEE ALSO
arch_prctl(2), set_thread_area(2), vm86(2) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 MODIFY_LDT(2)
All times are GMT -4. The time now is 10:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy