I have a varable(var1) in a AWK script that contain data in the following format
-
I need to extract timestamp,priority and log message.I can extract these by using split function but i don't want to use it, since i want to extract it in one go. I have some difficulties in doing it using... (3 Replies)
Ive got a file with words and also numbers.
Bla BLA
10 10
11 29
12 89
13 35
And i need to change "10,29,89,25" and also remove anything that contains actually words... (4 Replies)
I can print a line with an expression using this:
awk '/regex/'
I can print the line immediately before an expression using this:
awk '/regex/{print x};{x=$0}'
How do I print the line immediately before and then the line with the expression? (2 Replies)
Hello Experts,
Please help me to cope with the following problem
I ve patterens like
Input
Noptx(5) // remain the same
-*Nop(3);
Nop(9);
--Nop(8); // remain the same d3
**---Nop(7); //remain the same d3
**---Nop(7);
*--Nop(6);
--**Nop(5);
-Nop(4);
Nop(3);
- represents a space... (2 Replies)
Hi,
I have a string like this-->"After Executing service For 10 Request"
in this string i need to extract "10".
the contents of the string is variable and "10" appears before "For" and after "Request" i.e, in this format "For x Request"
I need to extract the value of x. How to do this in AWK?... (10 Replies)
I have a file "fwcsales_filenames.txt" which has a list of file names that are supposed to be copied to another directory. In addition to that, I am trying to extract the date part and write to the log.
I am getting the regular expression error when trying to strip the date part using the "ll"... (1 Reply)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Hello,
I have big files which I wanna filter them based on first column.
first column should be one of these strings: chr2L || chr2R || chr3L || chr3R || chr4 || chrX
and something like chr2Lh or chrY or chrM3L is not accepted.
I used the following command:
awk '{ if ($1=="chr2L" ||... (5 Replies)
Hi,
I have a file with two fields in it as shown below
14,30
28,30
16,30
22,30
21,30
3,30
Fields are separated by comma ",".
I've been trying to validate the file based on the condition "each field must be a numeric value"
I am using HP-UX OS.
I have tried the following awk... (4 Replies)
Hi All,
I would like to search a regular expression by passing as an i/p variableto AWK.
For Example ::
162.111.101.209.9516
162.111.101.209.41891
162.111.101.209.9516
162.111.101.209.9517
162.111.101.209.41918
162.111.101.209.9517
162.111.101.209.41937
162.111.101.209.41951... (7 Replies)
Discussion started by: Girish19
7 Replies
LEARN ABOUT OSX
lessecho
LESSECHO(1) General Commands Manual LESSECHO(1)NAME
lessecho - expand metacharacters
SYNOPSIS
lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-a] file ...
DESCRIPTION
lessecho is a program that simply echos its arguments on standard output. But any argument containing spaces is enclosed in quotes.
OPTIONS
A summary of options is included below.
-ox Specifies "x" to be the open quote character.
-cx Specifies "x" to be the close quote character.
-pn Specifies "n" to be the open quote character, as an integer.
-dn Specifies "n" to be the close quote character, as an integer.
-mx Specifies "x" to be a metachar.
-nn Specifies "n" to be a metachar, as an integer.
-ex Specifies "x" to be the escape char for metachars.
-fn Specifies "n" to be the escape char for metachars, as an integer.
-a Specifies that all arguments are to be quoted. The default is that only arguments containing spaces are quoted.
SEE ALSO less(1)AUTHOR
This manual page was written by Thomas Schoepf <schoepf@debian.org>, for the Debian GNU/Linux system (but may be used by others).
Send bug reports or comments to bug-less@gnu.org.
Version 418: 02 Jan 2008 LESSECHO(1)