Hi, I am n00b to shell scripting and I am learning Ksh, sed and awk. I have a requirement and need your help.
1) How to read a specific section of a file. I have a file and I want to read the contents between say "Page Number:1" to "End of Page 1"
2) Within the section of the file that was... (2 Replies)
are there any basic commands that can display lines 99 - 101 of the /etc/passwd file?
I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Hello,
I need help in putting duplicate lines within a section into another file. Here is what I'm struggling with:
Using this file data.txt:
ABC1 012345 header
ABC2 7890-000
ABC3 012345 Header Table
ABC4
ABC5 593.0000 587.4800
ABC5 593.5000 587.6580 <= dup need to remove
ABC5... (4 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
I have a list of Servers in no particular order as follows:
virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection).
9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
i have a log file that has the date and time that looks like this:
Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic
what we want to focus on is the first 5 columns because they contain the date and time.
the date and time can be anywhere on the line. in this... (6 Replies)
Hi,
I want to add a text to the end of the specific line in a file. Now my file looks like this:
999
111
222
333
111
444
I want to add the string " 555" to the end of the first line contaning 111. Moreover, I want to insert a newline after this line containg the "000" string. The... (8 Replies)
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
LEARN ABOUT DEBIAN
swiss::stars
SWISS::Stars(3pm) User Contributed Perl Documentation SWISS::Stars(3pm)NAME
SWISS::Stars.pm
DESCRIPTION
SWISS::Stars represents the ** lines within an SWISS-PROT + TrEMBL entry. These are the lines with the line tag ** which are normally not
publicly visible.
SWISS::Stars is a master object like SWISS::Entry. It contains subobjects which represent the different line types in the ** section. Each
line type has a two letter tag in addition to the ** line tag. This module has been written to allow easy addition of new ** line types. To
use a new ** line tag, just use the tag as an object dereference. Example:
$entry->Stars->XX->add("New XX tag line.","Second new XX tag line.");
If there is no class SWISS::Stars::XX, the class of the new object will be SWISS::Stars::default, which handles lines with the
corresponding tag as an array of lines. If more specific handling is required, a new class SWISS::Stars::XX can be created following the
template of SWISS::Stars::default. An example is SWISS::Stars::aa.
Subclass names and new line tags have to be two-letter-tags. No checks are made wheter the dereferenced tag is allowed.
Access to the (old) unstructured ANNOTATOR'S SECTION is provided by the line tag 'aa'.
$entry->Stars->aa->add("Testline 1.","Second new test line.");
will add these two lines to the ANNOTATOR'S SECTION.
Inherits from
SWISS::BaseClass.pm
Attributes
No public attributes apart from the subclasses.
Methods
Standard methods
new
fromText
toText
update
perl v5.10.1 2006-01-26 SWISS::Stars(3pm)