I want to print data in between two lines in a file sample.txt through more or cat command on the screen. For that I am using below sed command to give the BEGIN and END text.
Content of sample.txt
Command and its output:
The above method is working fine but since I may have more cat text for server01 in sample.txt so I want to include complete text 'server01:~ # cat /proc/mdstat' in the BEGIN or END in between the sed / / for exact matching. But it gives error when I put like below because the matching string itself contains Hash (/) :
I have a list of names and email addresses, like this. The <tab> markers are actually tabs.
joe.blow <tab> joe.blow@wherever.com
tom.t.hall <tab> tom.t.hall@wherever.com
john.r.smith <tab> john.r.smith@wherever.com
sally.jones <tab> sally.jones@state.or.us
I want to parse the data so that... (3 Replies)
How to use sed to remove html tags including text between them?
Example: User <b> rolvak </b> is stupid. It does not using <b>OOP</b>!
and should output: User is stupid. It does not using !
Thank you.. (2 Replies)
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
How do I filter only comments and still keep Line breaks at the end of the line!?
This is one of the common tasks we all do,, How can we do this in a right way..!?
I try to ignore empty lines and commented lines using following approach.
test.sh
# \040 --> SPACE character octal... (17 Replies)
I have the following line:
4/23/2010 0:00:38.000: Copying $$3MSYDDC02$I would like to use sed (or similiar) to remove everthing between and including $ that appears in the line so it ends up like this.
4/23/2010 0:00:38.000: Copying 3MSYDDC02I have been trying these but i'm really just... (5 Replies)
Hi,
I am using the following command(sed) to get the key/value pair from the string
String="{ "test":"test message", "testmessage":"subscription is active, charge successfully} " }"
status=$( echo $String | sed -e 's/^.*\("testmessage":*\).*$/\1/')
echo $status
i am getting this... (2 Replies)
hello.
How to remove all characters in a line from first character ( a $ ) until and including the third occurrence of that character ( $ ).
Any help is welcome. (10 Replies)
Hello,
I could not remove brackets with text contents
myfile:
Please remove the bracket with text
I wish to remove:
I tried:
sed 's/\//' myfile
It gives:
Please remove the bracket with text A1
I expect:
Please remove the bracket with text
Many thanks
Boris (2 Replies)
Hello All,
I have created a script that searches for different things and "sanitizes" the findings from files. Currently the user is required to put in a hostname (server.serverfarm.abc) one at a time to replace. I would like the user be able to use *.*.abc in grep and then pipe into sed to... (1 Reply)
Discussion started by: jvezinat
1 Replies
LEARN ABOUT ULTRIX
gencat
gencat(1int)gencat(1int)Name
gencat - generate a formatted message catalog
Syntax
gencat catalog_file [source_file ...]
Description
The command takes one or more message source files and either creates a new catalog or merges new message text into an existing catalog.
You should use the extension for message text files (for example, ) and the extension for catalogs (for example, ) to process files with
the command.
In some cases, a formatted message catalog exists that has the same name the one that is creating. When this occurs, merges the messages
from the source message catalogs into this existing formatted message catalog. The command merges the source message catalogs into the
formatted message catalog in the same manner as it merges a group of source message catalogs. If a source message catalog contains the
same set number or message number as a set or message in the formatted message catalog, the source message catalog set or message has
precedence. For example, if both the source and formatted message catalogs contain a message number 25, the message text for message 25 in
the source message catalog replaces the message text in the formatted message catalog. Thus, when source message catalogs are merged with
formatted message catalogs, the formatted catalogs are updated.
If you do not specify a source file, the command accepts message source data from standard input.
Numeric message source files are portable between X/Open systems.
For information on the source format for messages files, see the Guide to Developing International Software.
Restrictions
The command does not accept mnemonic identifiers. You must run the command if you want to use mnemonic identifiers.
See Alsoextract(1int), mkcatdefs(1int), trans(1int), catgets(3int), catopen(3int), intro(3int), environ(5int)
Guide to Developing International Software
gencat(1int)