Hello,
I need to select the 3 lines above as well as below a search string, including the search string.
I have been trying various combinations using sed command without any success.
Can anuone help please.
Thanking (2 Replies)
I'm trying to count the number of 2 specific characters in a very large file. I'd like to avoid using gsub because its taking too long.
I was thinking something like:
awk '-F' { t += NF - 1 } END {print t}' infile > outfile
which isn't working
Any ideas would be great. (3 Replies)
Hey All
Can any one please suggest the procedure to search a part of line in a very large file in which log entries are entered with very high speed.
i have trued with grep and egrep
grep 'text text text' <file-name>
egrep 'text text text' <file-name>
here 'text text text' is... (4 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)
Hi guys,
i have a really big file, and i want to remove a specific line.
sed -i '5d' fileThis doesn't really work, it takes a lot of time...
The whole script is supposed to remove every word containing less than 5 characters and currently looks like this:
#!/bin/bash
line="1"... (2 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)
testfile.csv
0","1125209",,"689202CBx18888",,"49",,,"NONMC",,,,,"01112010",,,,,,,"MTM-
"1","",,"689202ABx19005",,"49",,,"NONMC",,,,,"01072010",,,,,,,"MTM-
testfile.csv looks like above format
if the second column is null then get 23rd column and store in a different varible .. add all the... (1 Reply)
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)
Hello,
I have a relatively large text file (25,000K) consisting of records of data. For each record, I need to create a new line based on what is already there.
Every record has a block that looks like,
M END
> <ID>
1
> <SOURCE>
KEGG
> <SOURCE_ID>
C00002
> <NAME>
ATP;... (4 Replies)
I am trying to make my script as simple as a possible but, I am not sure if the way I am approaching is necessarily the most efficient or effective it can be. What I am mainly trying to fix is a for loop to remove a string from the specified files and within this loop I am trying to copy the lines... (2 Replies)
Discussion started by: Allie_gastrator
2 Replies
LEARN ABOUT ULTRIX
aliases
aliases(5) File Formats Manual aliases(5)Name
aliases - aliases file for sendmail
Description
The aliases file is an ASCII file that describes user ID aliases that are used in It is formatted as a series of lines in the following
form:
name: name_1, name2, name_3, . . .
The name is the name to alias, and the name_n are the aliases for that name. Each is separated from the next by a new line.
Continuation lines begin with white space. Comment lines begin with a number sign (#).
You can only assign aliases to local names. Loops are not allowed because a message should be sent to a person only once.
After an alias has been applied, local and valid recipients who have a file in their home directory can have messages forwarded to the list
of users defined in that file.
This is only the raw data file; the actual information pertaining to aliases is placed into binary format in the files and using the pro-
gram The command should be executed each time the aliases file changes. This command allows the new changes to take effect.
Restrictions
Because of restrictions in a single alias cannot contain more than approximately 1000 bytes of information. You can specify longer aliases
by chaining; that is, use a dummy name for the last name in the alias, which creates a continuation alias.
The database may be distributed in a network by a naming service, such as Yellow Pages or BIND/Hesiod. See the Guide to Yellow Pages or
the chapter on Hesiod in the Guide to BIND for setup information.
FilesSee Alsonewaliases(1), dbm(3x), sendmail(8)
"SENDMAIL Installation and Operation Guide", ULTRIX Supplementary Documents, Vol. III: System Manager
Guide to the BIND/Hesiod Service
Guide to the Yellow Pages Service
aliases(5)