01-10-2013
@bipinajith: Thanks. Its working but deleting lines starting with TER that I dont want.
@rdrtx1: Thanks its working fine.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I did a search but couldn't find a thread that seemed to answer this but my apologies if it has been answered before.
I have some text files and I need to remove any line that does not start with a number (0-9). In actuality every line like this starts with a 'T' (or 't') but there are a... (5 Replies)
Discussion started by: skray
5 Replies
2. Shell Programming and Scripting
Hi All,
Can anyone help me please,
I have a word like below.
6,76
I want to read this word and check if it has "," (comma) and if yes then i want to replace it with "." (dot). That means i want to be changed to 6.76
If the word doesnot contain "," then its should not be changed.
Eg.
... (6 Replies)
Discussion started by: girish.raos
6 Replies
3. Shell Programming and Scripting
Hi All,
I have a big log file i want to delete all characters (between 350th to 450th characters) starting at 350th character position to 450th character position.
please advice or sample code. (6 Replies)
Discussion started by: rajeshorpu
6 Replies
4. Shell Programming and Scripting
Hi Guys,
I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language
the text file contains data in a pipe delimited format
sdfsdfs
sdfsdfsd
START_ROW
sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies
5. Shell Programming and Scripting
Hi All,
Was wondering how I can do the following....
I have a String as follows
"ACCTRL000005022RRWDKKEEDKDD...."
This string can be in a file called tail.out or in a Variable called $VAR2
Now I have another variable called $VAR1="000004785" (9 bytes long), I need the content of... (5 Replies)
Discussion started by: mohullah
5 Replies
6. Shell Programming and Scripting
Title says all :p
Thanks for your help (4 Replies)
Discussion started by: drbiloukos
4 Replies
7. Shell Programming and Scripting
Hi,
I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this:
Records
P1
10,23423432
,77:1
,234:2
P2
10,9089004
,77:1
,234:2
,87:123
,9898:2
P3
456456
P1
:123,456456546
P2
abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies
8. Shell Programming and Scripting
Hi All,
I have a file in which a number of lines are starting with similar first word but different next words.
I want to replace the any nth word(not 1st or 2nd) with another word.
Eg:- My file contains are like this:-
Ram is a boy.
Ram is a good boy.
Ram plays cricket.
Here I want to... (2 Replies)
Discussion started by: mukeshbaranwal
2 Replies
9. UNIX for Dummies Questions & Answers
Hi
I am very new to unix and please help me in solving the below problem
I have a file with 50000+ rows. Each row(line) start with 01 or 02 or 03.
Now i have to get the count of rows starting with 01 only,
Thanks in advance (3 Replies)
Discussion started by: nmakkena
3 Replies
10. Shell Programming and Scripting
Hi,
I am trying to get longest line in a .gz file without extract the file.
I am using the below command to get the longest line.
zcat /a/b/c/file.gz |awk '{print length, $0}'|sort -nr|head -1
247 AAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBAAAAAA CCCCCCCCCCC DDDDDDDDDDDD EEEEEEEEEEEEEE... (4 Replies)
Discussion started by: k_manimuthu
4 Replies
rcsdiff(1) General Commands Manual rcsdiff(1)
NAME
rcsdiff - compareRCS revisions
SYNOPSIS
rev1] rev2] file ...
DESCRIPTION
compares two revisions of each given RCS file and creates output very similar to (see diff(1)). A file name ending in is an RCS file name,
otherwise it is a working file name. derives the working file name from the RCS file name and vice versa, as explained in rcsintro(5).
Pairs consisting of both an RCS and a working file name can also be specified.
recognizes the following options:
Same as described in
diff(1);
Same as described in
diff(1);
Same as described in
diff(1);
Same as described in
diff(1);
Generate an edit script of the format used by
RCS.
Generate a diff with lines of context.
The default is to present 3 lines of context. To change, specify n; for example, gives 10 lines of context.
modifies the output format slightly from the normal diff(1) output. The ``context'' output begins with identification of the
files involved and their creation dates, then each change is separated by a line with a dozen (asterisks). Lines removed from
file1 are marked with (dashes); those added to file2 with (pluses). Lines that are changed from one file to the other are
marked in both files with (exclamation marks).
If both rev1 and rev2 are omitted, compares the latest revision on the trunk with the contents of the corresponding working file. This is
useful for determining what was changed since the last check-in.
If rev1 is given, but rev2 is omitted, compares revision rev1 of the RCS file with the contents of the corresponding working file.
If both rev1 and rev2 are given, compares revisions rev1 and rev2 of the RCS file.
Both rev1 and rev2 can be given numerically or symbolically.
EXAMPLES
Compare the latest trunk revision of RCS file and the contents of working file
Compare the revisions 1.1 and 1.2 in the RCS file
AUTHOR
was developed by Walter F. Tichy.
SEE ALSO
ci(1), co(1), diff(1), ident(1), rcs(1), rcsmerge(1), rlog(1), rcsfile(4), rcsintro(5).
rcsdiff(1)