sed can do it, for example Get 99..154 characters followed by a non-digit followed by a dot, match the rest, substitute the entire match by the part that matches the expression in \( \). Suppress the default print, print if match succeeded.
Hi,
I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this?
Thanks for your help. (1 Reply)
file1 contains:
this is a test
this is a test and only a test
this is another test
this is another test and only another only
i'd like my file to look like this:
this is a test.
this is a test and only a test.
this is another test.
this is another test and only another only. (6 Replies)
Hello friends,
I am looking for any sed/awk/python script that can identify the position of a character or word in a file. Well, I prefer sed. <space> is a tab space since I actually dont know how to make the forum editor display a space as such.
Sample text
-----------
... (3 Replies)
Hello All ,
i am a newbie in korn shell scripting trying to trim a sentence that is parsed into a variable . The format of the sentence has three words that are separated from other by a
" : " colon and "." period . Format of the sentence looks like
... (5 Replies)
Dear help!
I want to print
The number i is number i
let i=1 to 5
output
should be like
The number 1 is number 1
The number 2 is number 2
The number 3 is number 3
The number 4 is number 4
The number 5 is number 5
Would be gr8 if you mke this with awk
Thanks (7 Replies)
Hello All,
I have file names in a directory that ends this way
File Names in the directory
abc.log.1.txt
abc.log.2.txt
abc.log.3.txt
I want to print the 1, 2 and 3 in the file names as the first column in my output, and some contents of the files as second and fourth columns. I wrote... (3 Replies)
Hi all,
I have ot match sentence list and word list anf fetch similar words in a separate file
second file with 2 columns
So I want the output shuld be 2 columns like this (3 Replies)
I started venturing in learning the art of using AWK/GAWK and wanted to simply added a period from line #11 to line #28 or to the end of the file if there is data. So for example:
11 Centos.NM
12 dojo1
13 redhat.5.5.32Bit
14 redhat.6.2.64Bit... (5 Replies)
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
LEARN ABOUT DEBIAN
ioping
IOPING(1) User Commands IOPING(1)NAME
ioping - simple disk I/O latency monitoring tool
SYNOPSYS
ioping [-LCDRq] [-c count] [-w deadline] [-p period] [-i interval] [-s size] [-S wsize] [-o offset] device|file|directory
ioping -h | -v
DESCRIPTION
This tool lets you monitor I/O latency in real time.
OPTIONS -c count
Stop after count requests.
-w deadline
Stop after deadline time passed.
-p period
Print raw statistics for every period requests.
-i interval
Set time between requests to interval (1s).
-s size
Request size (4k).
-S size
Working set size (1m).
-o offset
Offset in input file.
-L Use sequential operations rather than random. This also sets request size to 256k (as in -s 256k).
-C Use cached I/O.
-D Use direct I/O.
-R Disk seek rate test (same as -q -i 0 -w 3 -S 64m).
-q Suppress human-readable output.
-h Display help message and exit.
-v Display version and exit.
Argument suffixes
For options that expect time argument (-i and -w), default is seconds, unless you specify one of the following suffixes (case-insensitive):
us, usec
microseconds
ms, msec
milliseconds
s, sec seconds
m, min minutes
h, hour
hours
For options that expect "size" argument (-s, -S and -o), default is bytes, unless you specify one of the following suffixes (case-insensi-
tive):
s disk sectors (a sector is always 512).
k, kb kilobytes
p memory pages (a page is always 4K).
m, mb megabytes
g, gb gigabytes
t, tb terabytes
For options that expect "number" argument (-p and -c) you can optionally specify one of the following suffixes (case-insensitive):
k kilo (thousands, 1 000)
m mega (millions, 1 000 000)
g giga (billions, 1 000 000 000)
t tera (trillions, 1 000 000 000 000)
EXIT STATUS
Returns 0 upon success. The following error codes are defined:
1 Invalid usage (error in arguments).
2 Error during preparation stage.
3 Error during runtime.
EXAMPLES
ioping .
Show disk I/O latency using the default values and the current directory, until interrupted.
ioping -c 10 -s 1M /tmp
Measure latency on /tmp using 10 requests of 1 megabyte each.
ioping -R /dev/sda
Measure disk seek rate.
ioping -RL /dev/sda
Measure disk sequential speed.
SEE ALSO
Homepage <http://code.google.com/p/ioping/>.
AUTHORS
This program was written by Konstantin Khlebnikov <koct9i@gmail.com>.
Man-page was written by Kir Kolyshkin <kir@openvz.org>.
July 2011 IOPING(1)