--
@RudiC that script will print the "Comparing" line for every line with value > 10, so if there are two > 10 then the Comparing line will be printed twice
This User Gave Thanks to Scrutinizer For This Post:
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Hi Experts,
Help needed on joining one line above & below to the pattern matched string line.
The input file, required output is mentioned below
Input file
ABCD DEFG5 42.0.1-63.38.31
KKKK iokl IP Connection Available
ABCD DEFG5 42.0.1-63.38.31
... (7 Replies)
Hello,
I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help.
I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Hello Friends,
I need to print lines in between two string when a keyword existed in those lines (keywords like exception, error, failed, not started etc).
for example,
input:
..
Begin Edr
ab12
ac13
ad14
bc23
exception occured
bd24
cd34
dd44
ee55
ff66
End Edr (2 Replies)
Hi experts,
I have a file with regexes which is used for automatic searches on several files (40+ GB).
To do some postprocessing with the grep result I need the matching line as well as the match itself.
I know that the latter could be achieved with grep's -o option. But I'm not aware of a... (2 Replies)
hello everyone,
im new here, and also programming with awk, sed and grep commands on linux.
In my text i have many lines with this config:
1 1 4 3 1 1 2 5
2 2 1 1 1 3 1 2
1 3 1 1 1 2 2 2
5 2 4 1
3 2 1 1 4 1 2 1
1 1 3 2 1 1 5 4
1 3 1 1... (3 Replies)
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
Input:
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
Discussion started by: Abhisrajput
8 Replies
LEARN ABOUT OSX
wcsxfrm
WCSXFRM(3) BSD Library Functions Manual WCSXFRM(3)NAME
wcsxfrm, wcsxfrm_l -- transform a wide string under locale
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <wchar.h>
size_t
wcsxfrm(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n);
#include <wchar.h>
#include <xlocale.h>
size_t
wcsxfrm_l(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n, locale_t loc);
DESCRIPTION
The wcsxfrm() function transforms a null-terminated wide character string pointed to by ws2, according to the current locale's collation
order, then copies the transformed string into ws1. No more than n wide characters are copied into ws1, including the terminating null char-
acter. If n is set to 0 (it helps to determine an actual size needed for transformation), ws1 is permitted to be a NULL pointer.
Comparing two strings using wcscmp() after wcsxfrm() is equivalent to comparing two original strings with wcscoll().
Although the wcsxfrm() function uses the current locale, the wcsxfrm_l() function may be passed a locale directly. See xlocale(3) for more
information.
RETURN VALUES
Upon successful completion, wcsxfrm() returns the length of the transformed string not including the terminating null character. If this
value is n or more, the contents of ws1 are indeterminate.
SEE ALSO setlocale(3), strxfrm(3), wcscmp(3), wcscoll(3), xlocale(3)STANDARDS
The wcsxfrm() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
BUGS
The current implementation of wcsxfrm() only works in single-byte LC_CTYPE locales, and falls back to using wcsncpy() in locales with
extended character sets.
Comparing two strings using wcscmp() after wcsxfrm() is not always equivalent to comparison with wcscoll(); wcsxfrm() only stores information
about primary collation weights into ws1, whereas wcscoll() compares characters using both primary and secondary weights.
BSD October 4, 2002 BSD