hey.....
i do have text where the contents are like as follows,
FILE_TYPE_NUM_01=FILE_TYPE=01|FILE_DESC=Periodic|FILE_SCHDL_TYPE=Daily|FILE_SCHDL=|FILE_SCHDL_TIME=9:00am|RESULTS=B
FILE_TYPE_NUM_02=FILE_TYPE=02|FILE_DESC=NCTO|FILE_SCHDL_TYPE=Daily|FILE_SCHDL=|FILE_SCHDL_TIME=9:00am|RESULTS=M... (2 Replies)
Hi
This time I'm trying to grep for an exact match
e.g
cat.dog.horse.cow.bird.pig
horse.dog.pig
pig.cat.horse.dog
horse
dog
dog
pig.dog
pig.dog.bird
how do I grep for dog only so that a wc -l would result 2 in above case.
Thanks in advance
---------- Post updated at 06:33 AM... (4 Replies)
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1
CAR2_KEY0
CAR2_KEY1
CAR1_KEY10
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
This was mistaken as homework in a different forum, but is not. These are questions that are close to what I am trying to do at work.
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1... (1 Reply)
This post was previously mistaken for homework, but is actually a small piece of what I working on at work. Please answer if you can.
QUESTION1
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1... (2 Replies)
I am searching for an exact match on a value read from another file to lookup an email address in another file. The file being checked is called "contacts" and it has Act #, email address, and contact person.
1693;abc1693@yahoo.comt;Tommy D
6423;abc6423@yahoo.comt;Jim Doran... (2 Replies)
Hello!
I have 2 files named tacs.tmp and tacDB.txt
tacs.tmp looks like this
0
10235647
102700
106800
107200
1105700
tacDB.txt looks like this
100100,Mitsubishi,G410,Handheld,,0,0,0
100200,Siemens,A53,Handheld,,0,0,0
100300,Sony Ericsson,TBD (AAB-1880030-BV),Handheld,,0,0,0... (2 Replies)
I am currently having some issues while trying to grep for a exact string inside a file. I have tried doing this from command line and things work fine i.e. when no match is found, return code=1 but when its done as part of my script it returns 0 for the same command - I dont know if there is an... (6 Replies)
Discussion started by: Ads89
6 Replies
LEARN ABOUT DEBIAN
tabify
textutil::tabify(3tcl) Text and string utilities, macro processing textutil::tabify(3tcl)__________________________________________________________________________________________________________________________________________________NAME
textutil::tabify - Procedures to (un)tabify strings
SYNOPSIS
package require Tcl 8.2
package require textutil::tabify ?0.7?
::textutil::tabify::tabify string ?num?
::textutil::tabify::tabify2 string ?num?
::textutil::tabify::untabify string ?num?
::textutil::tabify::untabify2 string ?num?
_________________________________________________________________DESCRIPTION
The package textutil::tabify provides commands that convert between tabulation and ordinary whitespace in strings.
The complete set of procedures is described below.
::textutil::tabify::tabify string ?num?
Tabify the string by replacing any substring of num space chars by a tabulation and return the result as a new string. num defaults
to 8.
::textutil::tabify::tabify2 string ?num?
Similar to ::textutil::tabify this command tabifies the string and returns the result as a new string. A different algorithm is used
however. Instead of replacing any substring of num spaces this command works more like an editor. num defaults to 8.
Each line of the text in string is treated as if there are tabstops every num columns. Only sequences of space characters containing
more than one space character and found immediately before a tabstop are replaced with tabs.
::textutil::tabify::untabify string ?num?
Untabify the string by replacing any tabulation char by a substring of num space chars and return the result as a new string. num
defaults to 8.
::textutil::tabify::untabify2 string ?num?
Untabify the string by replacing any tabulation char by a substring of at most num space chars and return the result as a new
string. Unlike textutil::tabify::untabify each tab is not replaced by a fixed number of space characters. The command overlays each
line in the string with tabstops every num columns instead and replaces tabs with just enough space characters to reach the next
tabstop. This is the complement of the actions taken by ::textutil::tabify::tabify2. num defaults to 8.
There is one asymmetry though: A tab can be replaced with a single space, but not the other way around.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category textutil
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO regexp(3tcl), split(3tcl), string(3tcl)KEYWORDS
formatting, string, tabstops
CATEGORY
Text processing
textutil 0.7 textutil::tabify(3tcl)