Hi, I'm trying to output all text from the first paragraph in a file that contains a specific string through the last paragraph in that file that contains that string.
Previously, I was outputting just each paragraph with that search string with:
cat in_file | nawk '{RS=""; FS="\n";... (2 Replies)
Hi,
So I'm kinda new to shell scripts and the like. I've picked up quite a bit of use from browsing the forums here but ran into a new one that I can't seem to find an answer for.
I'm looking to parse/find a string AND the next 15 or so charachters that follow the string within a text file... (1 Reply)
hi, i'm new to shell scripting.
I have a text file(sample.txt). It contains the different username & password for different users of oracle db.
.txt content
user1|password1
user2|password2
user3|password3
user4|password4
First read the text file and take the username and password then... (5 Replies)
Hi ,
I have a simple text file with contents as below:
12345678900 971,76 4234560890
22345678900 5971,72 5234560990
32345678900 71,12 6234560190
the new csv-file should be like:
Column1;Column2;Column3;Column4;Column5
123456;78900;971,76;423456;0890... (9 Replies)
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
please help to write a awk command-line programs to achieve the following functions: Thank in advance.
Requeset Description:
compare two files f1 and f2, export to file f3:
1 Delete duplicate rows of in file f1 and file f2
2 If the 1th column of file f1 and file f2 is the same, then export... (1 Reply)
Discussion started by: weichanghe2000
1 Replies
LEARN ABOUT LINUX
set_robust_list
GET_ROBUST_LIST(2) Linux System Calls GET_ROBUST_LIST(2)NAME
get_robust_list, set_robust_list - get/set list of robust futexes
SYNOPSIS
#include <linux/futex.h>
#include <sys/types.h>
#include <syscall.h>
long get_robust_list(int pid, struct robust_list_head **head_ptr,
size_t *len_ptr);
long set_robust_list(struct robust_list_head *head, size_t len);
Note: There are no glibc wrappers for these system calls; see NOTES.
DESCRIPTION
The robust futex implementation needs to maintain per-thread lists of robust futexes which are unlocked when the thread exits. These lists
are managed in user space; the kernel is notified about only the location of the head of the list.
The get_robust_list() system call returns the head of the robust futex list of the thread whose thread ID is specified in pid. If pid is
0, the head of the list for the calling thread is returned. The list head is stored in the location pointed to by head_ptr. The size of
the object pointed to by **head_ptr is stored in len_ptr.
The set_robust_list() system call requests the kernel to record the head of the list of robust futexes owned by the calling thread. The
head argument is the list head to record. The len argument should be sizeof(*head).
RETURN VALUE
The set_robust_list() and get_robust_list() system calls return zero when the operation is successful, an error code otherwise.
ERRORS
The set_robust_list() system call can fail with the following error:
EINVAL len does not match the size of structure struct robust_list_head expected by kernel.
The get_robust_list() system call can fail with the following errors:
EPERM The calling process does not have permission to see the robust futex list of the thread with the thread ID pid, and does not have
the CAP_SYS_PTRACE capability.
ESRCH No thread with the thread ID pid could be found.
EFAULT The head of the robust futex list can't be stored at the location head.
VERSIONS
These system calls were added in Linux 2.6.17.
NOTES
These system calls are not needed by normal applications. No support for them is provided in glibc. In the unlikely event that you want
to call them directly, use syscall(2).
A thread can have only one robust futex list; therefore applications that wish to use this functionality should use the robust mutexes pro-
vided by glibc.
SEE ALSO futex(2)
Documentation/robust-futexes.txt and Documentation/robust-futex-ABI.txt in the Linux kernel source tree
Linux 2015-01-22 GET_ROBUST_LIST(2)