Sponsored Content
Top Forums Shell Programming and Scripting Print one sentence 40 to 50 words end with period in a file Post 302952087 by MadeInGermany on Thursday 13th of August 2015 12:42:54 PM
Old 08-13-2015
sed can do it, for example
Code:
sed -n 's/\(.\{99,154\}[^0-9]\.\).*/\1/p' test.txt

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.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find capital letter names in a file without finding words at start of sentence

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)
Discussion started by: kev269
1 Replies

2. Shell Programming and Scripting

Print starting 3rd line until end of the file.

Hi, I want to Print starting 3rd line until end of the file. Pls let me know the command. Thanks in advance. (1 Reply)
Discussion started by: smc3
1 Replies

3. UNIX for Dummies Questions & Answers

insert period at the end of each line

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)
Discussion started by: tjmannonline
6 Replies

4. Shell Programming and Scripting

Need help in script; [ script to control a sentence & its words ]

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)
Discussion started by: frozensmilz
3 Replies

5. Shell Programming and Scripting

Trim the sentence containing colon and period to extract a word in between

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)
Discussion started by: venu
5 Replies

6. Shell Programming and Scripting

print in incremental order a sentence

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)
Discussion started by: Indra2011
7 Replies

7. Shell Programming and Scripting

Print file end

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)
Discussion started by: jacobs.smith
3 Replies

8. Shell Programming and Scripting

match sentence and word adn fetch similar words in alist

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)
Discussion started by: manigrover
3 Replies

9. Shell Programming and Scripting

awk Adding a Period at the end of a line

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)
Discussion started by: metallica1973
5 Replies

10. Shell Programming and Scripting

Add words in beginning , end after removing a word in a file

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
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)
All times are GMT -4. The time now is 05:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy