10-27-2010
Thanks guys. Just getting around to checking up on this. They both work.
I swear, every time I think I know a little awk, I look at something like this and it looks like Greek. I think I get it, but I wouldn't want to have to explain it to someone or I would confuse us both. I'll use malcomex999's. It still looks like Greek but it's a little shorter so it has to be better, right?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
In the foll example the whole text in a single line....
i want to extract text from IPTel to RTCPBase.h.
want to use this acrooss the whole file
Updated: IPTel\platform\core\include\RTCPBase.h \main\MWS2051_Sablime_Int\1... (7 Replies)
Discussion started by: manish205
7 Replies
2. Shell Programming and Scripting
Hi Unix gurus
This is my first post here. I have a file which looks like this:
string1,string2
,string3
,string4
...
...
I need to append all words below first line to the first line, ie
string1,string2,string3,string4,...
Bear in mind that it is not known how many lines follow... (11 Replies)
Discussion started by: lmatlebyane
11 Replies
3. UNIX for Dummies Questions & Answers
This is the line that I am using:
sed 's/^*\({3}*$\)/\1 /' <test.txt >results.txt
and suppose that test.txt contains the following lines:
http://www.example.com/200904/AUS.txt
http://www.example.com/200903/_RUS.txt
http://www.example.com/200902/.FRA.txt
What I expected to see in results.txt... (6 Replies)
Discussion started by: figaro
6 Replies
4. Shell Programming and Scripting
This is my first post, please be nice. I have tried to google and read different tutorials.
The task at hand is:
Input file input.txt (example)
abc123defhij-E-1234jslo
456ujs-W-abXjklp
From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies
5. Shell Programming and Scripting
Hello all
i know it is pretty hard one but you will manage it all
after noticing and calculating i find a rhythm for the file i want to edit
to copy the last 12 characters in line but the problem is to add after first 25 characters in same line
in other way too copy the last 12 characters... (10 Replies)
Discussion started by: princesasa
10 Replies
6. UNIX for Dummies Questions & Answers
Hi Guys,
Can someone help me with a way to extract text between two words on a single line.
For example if the file has below content I want to extract all text between b and f inclusive of b and f. Aparently sed does this but does it line by line and I guess it cannot read word by word.
... (11 Replies)
Discussion started by: krishnaux
11 Replies
7. Shell Programming and Scripting
Hi
I have a very large data file with several hundred columns and millions of lines.
The important data is in the last set of columns with variable numbers of tab delimited fields in front of it on each line.
Im currently trying sed to get the data out - I want anything beetween :RES and... (4 Replies)
Discussion started by: Manchesterpaul
4 Replies
8. Shell Programming and Scripting
Hi All,
Is there another way to achieve this?
how get short phrase in a sentence with character count of 100 to 155 words end with period but don't end something like 50,000. .
Here's my current script but the output is not good. This will use for my snippets or preview.
grep... (6 Replies)
Discussion started by: lxdorney
6 Replies
9. Shell Programming and Scripting
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
10. Shell Programming and Scripting
In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Discussion started by: cmccabe
1 Replies
WDIFF(1) User Commands WDIFF(1)
NAME
wdiff - display word differences between text files
SYNOPSIS
wdiff [OPTION]... FILE1 FILE2
wdiff -d [OPTION]... [FILE]
DESCRIPTION
wdiff - Compares words in two files and report differences.
Mandatory arguments to long options are mandatory for short options too.
-C, --copyright
display copyright then exit
-1, --no-deleted
inhibit output of deleted words
-2, --no-inserted
inhibit output of inserted words
-3, --no-common
inhibit output of common words
-a, --auto-pager
automatically calls a pager
-d, --diff-input
use single unified diff as input
-h, --help
display this help then exit
-i, --ignore-case
fold character case while comparing
-l, --less-mode
variation of printer mode for "less"
-n, --avoid-wraps
do not extend fields through newlines
-p, --printer
overstrike as for printers
-s, --statistics
say how many words deleted, inserted etc.
-t, --terminal
use termcap as for terminal displays
-v, --version
display program version then exit
-w, --start-delete=STRING
string to mark beginning of delete region
-x, --end-delete=STRING
string to mark end of delete region
-y, --start-insert=STRING
string to mark beginning of insert region
-z, --end-insert=STRING
string to mark end of insert region
COMPATIBILITY
Some options that used to provide some unique functionality are no longer recommended, but still recognized for the sake of backwards com-
patibility.
-K, --no-init-term
Now synonymous to --terminal, which never initializes the terminal.
AUTHOR
Written by Franc,ois Pinard <pinard@iro.umontreal.ca>.
REPORTING BUGS
Report bugs to <wdiff-bugs@gnu.org>.
COPYRIGHT
Copyright (C) 1992, 1997, 1998, 1999, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for wdiff is maintained as a Texinfo manual. If the info and wdiff programs are properly installed at your site,
the command
info wdiff
should give you access to the complete manual.
wdiff 1.1.2 May 2012 WDIFF(1)