08-01-2011
@raduolov : Worked , exactly I was looking for this .
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
I've been banging my head against walls trying to search a comma delimited file, using awk. I'm trying to search a "column" for a specific parameter, if it matches, then I'd like to print the whole line.
I've read in multiple texts:
awk -F, '{ if ($4 == "string") print $0 }'... (2 Replies)
Discussion started by: Matthias03
2 Replies
2. Shell Programming and Scripting
I have multiple config files where I need to pull the ip address from loopback3. The format is the same in every file, the ip is the second line after interface loopback3.
interface loopback2 loopback
description router ID
ip address 192.168.1.1
interface loopback3 loopback
description... (3 Replies)
Discussion started by: numele
3 Replies
3. Shell Programming and Scripting
If i wanted to search for two strings that are on lines in the log, how do I do it?
The following code searches for just one string that is one one line.
awk '/^/ {split($2,s,",");a=$1 FS s} /failure agaf@fafa/ {b=a} END{print b}' urfile
What if I wanted to search for "failure agaf@fafa"... (3 Replies)
Discussion started by: SkySmart
3 Replies
4. Shell Programming and Scripting
Hi
I am trying to search and replace a multi line pattern in a php file using awk.
The pattern starts with
<div id="navbar">
and ends with
</div>
and spans over an unknown number of lines.
I need the command to be a one liner.
I use the "record separator" like this :
awk -v... (8 Replies)
Discussion started by: louisJ
8 Replies
5. Shell Programming and Scripting
Hi,
I have a file with values like this
1 11
2 11
3 44
4 55
5 66 (an representative of what I have).
I want to split this file into smaller files based on column 1 values (values within a range).
The issue that I am facing is that the file is really big, and takes too long to... (21 Replies)
Discussion started by: new_one
21 Replies
6. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
7. Shell Programming and Scripting
I have a log file that contains many lines but contains the following line three times:
related_pin : "t_bypass";
Here are the 3 occurrences and the two lines after from my file.txt:
related_pin : "t_bypass";
sdf_cond : "rstq_b";
timing_sense : negative_unate;
... (6 Replies)
Discussion started by: bobbygb2003
6 Replies
8. Shell Programming and Scripting
I am an awk beginner and need help figuring out how to search for a number in the first column and if it (or anything greater) exists, remove those lines.
AM11400012012 2.26 2.12 1.98 2.52 3.53 3.01 3.62 5.00 3.65 7.95 0.79 3.88 0.00
AM11400012013 3.39 2.29 ... (1 Reply)
Discussion started by: ncwxpanther
1 Replies
9. Shell Programming and Scripting
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies
10. Shell Programming and Scripting
Input:
|Running the Rsync|Sun Oct 16 22:48:01 BST 2016
|End of the Rsync|Sun Oct 16 22:49:54 BST 2016
|Running the Rsync|Sun Oct 16 22:54:01 BST 2016
|End of the Rsync|Sun Oct 16 22:55:45 BST 2016
|Running the Rsync|Sun Oct 16 23:00:02 BST 2016
|End of the Rsync|Sun Oct 16 23:01:44 BST 2016... (4 Replies)
Discussion started by: busyboy
4 Replies
LEARN ABOUT CENTOS
spectool
SPECTOOL(1) User Commands SPECTOOL(1)
NAME
spectool - manual page for spectool v1.0.10rpmdev1
SYNOPSIS
spectool [<options>] <specfile>
DESCRIPTION
Spectool is a tool to expand and download sources and patches from specfiles.
If you experience problems with specific specfiles, try to run
rpmbuild --nobuild --nodeps <specfile>
on the file which might give a clue why spectool fails on a file (ignore anything about missing sources or patches). The plan is to catch
errors like this in spectool itself and warn the user about it in the future.
OPTIONS
Operating mode:
-l, --lf, --list-files
lists the expanded sources/patches (default)
-g, --gf, --get-files
gets the sources/patches that are listed with a URL
-h, --help
display this help screen
Files on which to operate:
-A, --all
all files, sources and patches (default)
-S, --sources
all sources
-P, --patches
all patches
-s, --source x[,y[,...]]
specified sources
-p, --patch a[,b[,...]]
specified patches
Miscellaneous:
-d, --define 'macro value'
defines RPM macro 'macro' to be 'value'
-C, --directory dir
download into specified directory (default '.')
-R, --sourcedir
download into rpm's %{_sourcedir}
-n, --dryrun, --dry-run
don't download anything, just show what would be done
-f, --force
try to unlink and download if target files exist
-D, --debug
output debug info, don't clean up when done
FILES
/etc/rpmdevtools/curlrc
optional curl(1) configuration
spectool v1.0.10rpmdev1 June 2014 SPECTOOL(1)