capturing the value in file before string(*) and the similar value in next line only
I've the output in the file like below. I want to capture the value in file before string(*) and the similar value in next line only.
In this example, I am looking for the below output
Last edited by Franklin52; 02-01-2012 at 05:26 AM..
Reason: Please use code tags for code and data samples, thank you
Hi all,
I did some searching in this forum but can't find anything that matches the issue I'm bumping heads with.
On a CentOS4/Postfix (and bash everywhere) mail gateway box I run a command periodically to purge the Postfix queue of messages "From:MAILER-DAEMON".
This is the one line'r... (6 Replies)
Hi Guys. I have tried the commands sort and join. But I couldn't able to to find the command for joining in a single line based on keys.My example inputs and outputs are like the following.
Help would be appreciated.:D
Input file
a1tabXXXXXXX
a2tabXXXXXXX
a6tabYYYYYYYYY
a71tabXXXXXXX... (7 Replies)
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Guys,
Here is the script that searches string from the set of similar files from the log directory, All the file patterns are defined as input file, from where the script should map to those files in the LOG_DIR and should start searching the strings from all those similar files.
... (1 Reply)
Can someone please help me how do I find a URL from lines of log file and write all the output to a new file?
For e.g - Log file has similar entries,
39.155.67.5 - - "GET /abc/login?service=http://161.120.36.39/CORPHR/TMA2007/default.asp HTTP/1.1" 401 3218
54.155.63.9 - - "GET... (2 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
I am trying to capture the last value before the the * in test4.txt file using sed & tail (in this case 0FA). I got the output using the below steps.
P.s: The number of * in the file varies from file to file.
Any idea of a better way to do this?
cat test4.txt
... (2 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)
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
LEARN ABOUT FREEBSD
ispunct_l
ISPUNCT(3) BSD Library Functions Manual ISPUNCT(3)NAME
ispunct -- punctuation character test
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int
ispunct(int c);
int
ispunct_l(int c, locale_t loc);
DESCRIPTION
The ispunct() function tests for any printing character except for space (' ') or a character for which isalnum(3) is true. The value of the
argument must be representable as an unsigned char or the value of EOF.
In the ASCII character set, this includes the following characters (with their numeric values shown in octal):
041 ``!'' 042 ``"'' 043 ``#'' 044 ``$'' 045 ``%''
046 ``&'' 047 ``''' 050 ``('' 051 ``)'' 052 ``*''
053 ``+'' 054 ``,'' 055 ``-'' 056 ``.'' 057 ``/''
072 ``:'' 073 ``;'' 074 ``<'' 075 ``='' 076 ``>''
077 ``?'' 100 ``@'' 133 ``['' 134 ``'' 135 ``]''
136 ``^'' 137 ``_'' 140 ```'' 173 ``{'' 174 ``|''
175 ``}'' 176 ``~''
The ispunct_l() function takes an explicit locale argument, whereas the ispunct() function uses the current global or per-thread locale.
RETURN VALUES
The ispunct() and ispunct_l() functions return zero if the character tests false and return non-zero if the character tests true.
COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered
obsolete and may not be supported in future releases. The iswpunct() function should be used instead.
SEE ALSO ctype(3), iswpunct(3), ascii(7)STANDARDS
The ispunct() function conforms to ISO/IEC 9899:1990 (``ISO C90''). The ispunct_l() function conforms to IEEE Std 1003.1-2008 (``POSIX.1'').
BSD July 30, 2012 BSD