I cannot reproduce the problem with the code you posted. The problem sounds like you have a space in your commands but you forgot to copy+paste precisely that space here ...?
Incidentally, cat | grep | awk is a magnificent Useless Use of Cat. Google for that. Here's a slightly less useless way to say that:
Anyway, if you want to replace that line in that file, you should probably be doing it all in a single awk command.
I would appreciate it if any one can guide me in using awk perhaps sed in extracting some values from a long string.
here is an example.
.......some lines here........
........ aaaa bbbb cccc ddddd eeeee fffff gggg (time:hhhh)........
......some lines here also..........
How can I extract... (2 Replies)
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Hi,
I have a csv ( comma seperated value) file and I want to search for a particular string in each line of that file only if it occurs only once in the line.
That is same string may be present more than once in a line but I want it to be greped only when it occurs just once.
Please advice... (17 Replies)
i have a script that checks inside the file and find the start date and end date with time...........
#!/bin/ksh
cd /ednadtu3/u01/pipe/logs
TZ=`date +%Z`+24 ;b=`date +%Y-%m-%d`
echo $b
for i in DBMaint.log
do
echo "Start Time:" >> /ednadtu3/u01/pipe/naveed/Report.txt
cat $i | grep... (3 Replies)
Hello,
I have active log file i want to grep the last occurrence of the word in that log file the log file gets on increasing and increasing i want to fetch it from live file.
Please guide me, Thanks in advance (4 Replies)
Hi All,
I am running a command from a remote server using ssh to different servers. I will get a output like below with 4 columns. I want to grab line which is having a coulmn which grate than or equal to 50. How can I do it with Awk or sed ??. I add a space to first row with sed 's/::/:: /g' to... (4 Replies)
Hi Folks,
I am searching something in multiple logs , actually an even ocuurs which get recorded in logs with a special word so rite now I am opening an individual log in vi and then searching it but total in the directory there are such 15 logs and it is very difficult to go one by one so... (1 Reply)
i want to grab lines from a file that are between two patterns (including the lines that contain the pattern).
here's what im currently doing:
data.txt
aaa
bbb
cccc
ddd
eee
ffff
ddd
code:
awk '/bbb/,/fff/ && $0 !~ /ddd/' cdsnmp.sh
I want to grab lines between and including bbb... (5 Replies)
Hello Experts,
I was trying to awk out some data out of a text file.
Below is a sample file which I have
xxx ***Wed Jun 28 18:00:59 CDT 2015
avg-cpu: %user %nice %system %iowait %steal %idle
17.10 0.00 4.56 2.86 0.00 75.48
Device: rrqm/s wrqm/s ... (2 Replies)
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
LEARN ABOUT DEBIAN
beagle_beagleflag
beagle.BeagleFlag(3) HMSBEAGLE beagle.BeagleFlag(3)NAME
beagle.BeagleFlag -
SYNOPSIS
Public Member Functions
BeagleFlag (long mask, String meaning)
long getMask ()
String getMeaning ()
boolean isSet (long flags)
Static Public Member Functions
static String toString (long flags)
Public Attributes
PRECISION_SINGLE = (1 << 0, 'double precision computation')
PRECISION_DOUBLE = (1 << 1, 'single precision computation')
COMPUTATION_SYNCH = (1 << 2, 'synchronous computation (blocking')
COMPUTATION_ASYNCH = (1 << 3, 'asynchronous computation (non-blocking)')
EIGEN_REAL = (1 <<4, 'real eigenvalue computation')
EIGEN_COMPLEX = (1 <<5, 'complex eigenvalue computation')
SCALING_MANUAL = (1 << 6, 'manual scaling')
SCALING_AUTO = (1 << 7, 'auto-scaling on')
SCALING_ALWAYS = (1 << 8, 'scale at every update')
SCALING_DYNAMIC = (1 << 19, 'manual scaling with dynamic checking')
SCALERS_RAW = (1 << 9, 'save raw scalers')
SCALERS_LOG = (1 << 10, 'save log scalers')
VECTOR_SSE = (1 << 11, 'SSE vector computation')
VECTOR_NONE = (1 << 12, 'no vector computation')
THREADING_OPENMP = (1 << 13, 'OpenMP threading')
THREADING_NONE = (1 << 14, 'no threading')
PROCESSOR_CPU = (1 << 15, 'use CPU as main processor')
PROCESSOR_GPU = (1 << 16, 'use GPU as main processor')
PROCESSOR_FPGA = (1 << 17, 'use FPGA as main processor')
PROCESSOR_CELL = (1 << 18, 'use CELL as main processor')
Detailed Description
Author:
Andrew Rambaut
Marc Suchard
Version:
$Id$
Author
Generated automatically by Doxygen for HMSBEAGLE from the source code.
Version 1.0.0 Fri May 25 2012 beagle.BeagleFlag(3)