Sponsored Content
Top Forums UNIX for Dummies Questions & Answers sed option to delete two words within a file Post 19707 by klannon on Monday 15th of April 2002 07:25:19 PM
Old 04-15-2002
Thanks for the help.

Peter,

I just wanted to say thanks, you answered my question. This site is execellent to budding unix users.

Best Regards,

Ken
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed [delete everything between two words]

Hi, I have the following codes below that aims to delete every words between two pattern word. Say I have the files To delete every word between WISH_LIST=" and " I used the below codes (but its not working): #!/bin/sh sed ' /WISH_LIST=\"/ { N /\n.*\"/ {... (3 Replies)
Discussion started by: Orbix
3 Replies

2. UNIX for Advanced & Expert Users

How to delete first 10 words from file

Hi, Could you please let me know, how to delete first 10 words from text files using vi? 10dw will delete it from current line, how to do it for all the lines from file? Thanks (6 Replies)
Discussion started by: sentak
6 Replies

3. Solaris

option to delete .tar file while extracting

Is there an option in tar which deletes the .tar file as soon as it is successfully extracted. (5 Replies)
Discussion started by: vickylife
5 Replies

4. Shell Programming and Scripting

Need to delete words in a file

Hi All, I have an input file a.txt which contains the following :: 08-08-09 1:00 PM 763763762 f00_unix1_server.txt i Just need to delete all the words which is before f Output :: f00_unix1_server.txt Thanks (4 Replies)
Discussion started by: raghav1982
4 Replies

5. Shell Programming and Scripting

sed/awk: Delete matching words leaving only the first instance

I have an input text that looks like this (comes already sorted): on Caturday 22 at 10:15, some event on Caturday 22 at 10:15, some other event on Caturday 22 at 21:30, even more events on Funday 23 at 11:00, yet another event I need to delete all the matching words between the lines, from... (2 Replies)
Discussion started by: GrinningArmor
2 Replies

6. UNIX for Dummies Questions & Answers

sed how to delete between two words within a file

I'm hoping someone could help me out please :) I have several .txt files with several hundred lines in each that look like this: 10241;</td><td>10241</td><td class="b">x2801;</td><td>2801</td><td>TEXT-1</td></tr> 10242;</td><td>10242</td><td... (4 Replies)
Discussion started by: martinsmith
4 Replies

7. Shell Programming and Scripting

Using Sed to Delete Words in a File

This is a Nagios situation. So i have a list of servers in one file called Servers.txt And in another file called hostgroups.cfg, i want to remove each and every one of the servers in the Servers.txt file. The problem is, the script I wrote is having a problem removing the exact servers in... (5 Replies)
Discussion started by: SkySmart
5 Replies

8. Shell Programming and Scripting

SED - delete words between two possible words

Hi all, I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line. Let me paste an 2 examples: anything before any string begin few lines of content end1 anything after anything before any... (4 Replies)
Discussion started by: meuser
4 Replies

9. Shell Programming and Scripting

sed delete option

I have tried doing this to delete some lines: sed '1,10d' file Now I want to specify a variable as a line number for example: lastline=wc -l file linestart=$lastline - 20 sed '$linestart,$lastlined' file but this will give error: sed: -e expression #1, char 3: extra characters after... (4 Replies)
Discussion started by: zorrox
4 Replies

10. Shell Programming and Scripting

sed not applying /d "delete line" option

So I'm on an AIX machine. And sed is not applying /d "delete line" option when I also include match word options \< and \> examples... echo cat | sed '/\<cat\>/d'will return cat for some reason echo cat | sed "/\<cat\>/d"will also still return cat. Of course i can just run echo cat... (9 Replies)
Discussion started by: escooter87
9 Replies
spell(1)						      General Commands Manual							  spell(1)

NAME
spell, hashmake, spellin, hashcheck - find spelling errors SYNOPSIS
local_file] [files] n spelling_list DESCRIPTION
The command collects words from the named files and looks them up in a spelling list. Words that neither occur among nor are derivable (by applying certain inflections, prefixes, and/or suffixes) from words in the spelling list are printed on the standard output. If no files are named, words are collected from the standard input. The command ignores most and eqn constructions. Options The command recognizes the following options: All words not literally in the spelling list are printed, and plausible derivations from the words in the spelling list are indicated. British spelling is checked. Besides preferring etc., this option insists upon in certain words, such as in Every plausible stem is printed with for each word. By default, follows chains of included files much like (see deroff(1)) which recognizes the intrinsics and the names of such included files begin with If the option is used, follows the chains of included files. With the option, ignores all chains of included files. If the option is used, words found in local_file are removed from output. local_file is the name of a user-provided file containing a sorted list of words, one per line. With this option, the user can specify a set of words that are correct spellings (in addition to spell's own spelling list) for each job. The spelling list is based on many sources, and while more haphazard than an ordinary dictionary, is also more effective with respect to proper names and popular technical words. Coverage of the specialized vocabularies of biology, medicine, and chemistry is light. Pertinent auxiliary files can be specified by name arguments, indicated below with their default settings (see FILES and VARIABLES). Copies of all output are accumulated in the history file. The stop list filters out misspellings (such as that would otherwise pass. Three routines help maintain and check the hash lists used by Reads a list of words from the standard input and writes the corresponding nine-digit hash code on the standard output. This program only accepts words that are up to 30 characters long. When words exceeding 30 characters are encountered, a diagnostic message is displayed on stan- dard error. Reads n hash codes from the standard input and writes a compressed spelling list on the standard output. Information about the hash coding is printed on standard error. Reads a compressed spelling_list and recreates the nine-digit hash codes for all the words in it; it writes these codes on the standard output. EXTERNAL INFLUENCES
Environment Variables Your hashed spelling list (default is Spelling history (default is Your hashed stop list (default is Directory for temporary files; overrides the default EXAMPLES
To check spelling of a single word: If word is spelled correctly, a prompt is returned. If it is spelled incorrectly, word is printed before the prompt is returned. To check spelling of multiple words, they can also be typed as a group on the same command line: To create a personal spelling list that incorporates the words already present in the default American spelling list file To modify the default British spelling list file replace all occurrences of with in the above example. To add words to the default spelling list, change login to change the current working directory to and execute the commands listed in the above example. WARNINGS
The spelling list's coverage is uneven. When undertaking the use of as a new tool, it may be advisable to monitor the output for several months to gather local additions. Typically, these are kept in a separate local file that is added to the hashed spelling_list via as shown above. The British spelling feature was developed by an American. Start-up versions of files and are available in directory If these files or a suitable equivalent are not present in directory complains: The command is likely to be withdrawn from X/Open standards. Applications using this command might not be portable to other vendors' sys- tems. FILES
Hashed spelling lists, American and British. Hashed stop list. History file. Executable program file. SEE ALSO
deroff(1), sed(1), sort(1), tbl(1), tee(1). STANDARDS CONFORMANCE
spell(1)
All times are GMT -4. The time now is 08:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy