anbu23 looks like it is working. the problem is that it is also deleting sub strings and not just the word. in addition, is there any option to delete spaces that come after the deleted word?
say I have a sentence: The password and the key are safe in the vault - please verify.
and after the script I should get : The and are safe in the vault - please.
Quote:
Originally Posted by RudiC
Welcome to the forum.
How do you plan to deliver the "hundreds of words I want to delete" if you "don't want to put all of them inside the quotes of sed nor inside an external file"?
Thank you RudiC, and you are right - that makes no sense. what i meant is that i don't want to manually separate the words with whatever separator is needed - but guess I can just write a script for that.
Hi,
In my korn shell script, I want to delete some particular text from a certain file...How can this be done? Is the below right?
ed $NAMES << EOF
echo "" > /dev/null
echo "${x} = " > /dev/null
echo "name = " > /dev/null
echo "adress = " > /dev/null
w
q
EOF (1 Reply)
How can i read all the unique words in a file, i used -
cat comment_file.txt | /usr/xpg6/bin/tr -sc 'A-Za-z' '/012'
and
cat comment_file.txt | /usr/xpg6/bin/tr -sdc 'A-Za-z' '/012'
but they didnt worked..... (5 Replies)
Hi, all:
I would like to search all files under "./" and its subfolders recursively to find out
those files contain both word "A" and word "B", and list the filenames finally.
How to realize that?
Cheers
JIA (18 Replies)
Morning Guys & Gals,
I am trying to figure out a way to remove lines from a file that have more than
2 identical characters in sequence..
So if for instance the list would look like ;
the output would be ;
I can't seem to get my head around perl (among many other... (7 Replies)
Hey all,
I'm doing a project currently and want to index words in a webpage.
So there would be a file with webpage content and a file with list of words, I want an output file with true and false that would show which word exists in the webpage.
example:
Webpage content data.html
... (2 Replies)
Hi
I am looking for the way to delete the block of data for example
original file
line1
line2
line3
line4
line5
input file
line2
line3
original file should contain
line1
line4
line5 (3 Replies)
I have a long list of alphanumberic words (no spaces or characters) in file1.txt I need to check for the existance of each of the words from file1.txt against file2.txt and if the word is NOT in file2.txt, I need to know about it, either standard output or redirect to file3.txt
For example:... (5 Replies)
Hello,
I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file.
Putting that in bullet points:
Search through "server.log" for lines that contain any word... (15 Replies)
Hi there, newbie there. I've been browsing the forums hoping to find a solution that answers a problem similar to what I need, but haven't had much luck. Any help would be greatly appreciated. Thanks!
I need to delete a bunch of text between every appearance of two words in a really large file... (3 Replies)
Discussion started by: lendl
3 Replies
LEARN ABOUT ULTRIX
spell
spell(1) General Commands Manual spell(1)Name
spell, spellin, spellout - check text for spelling errors
Syntax
spell [-v] [-b] [-x] [-d hlist] [+local-file] [-s hstop] [-h spellhist] [file...]
spellin [list]
spellout [-d] list
Description
The command collects words from the named documents, and looks them up in a spelling list. Words that are not on the spelling list and are
not derivable from words on the list (by applying certain inflections, prefixes or suffixes) are printed on the standard output. If no
files are specified, words are collected from the standard input.
The command ignores most and constructions.
Two routines help maintain the hash lists used by Both expect a set of words, one per line, from the standard input. The command combines
the words from the standard input and the preexisting list file and places a new list on the standard output. If no list file is speci-
fied, a new list is generated. The command looks up each word from the standard input and prints on the standard output those that are
missing from (or present on, with option -d) the hashed list file. For example, to verify that hookey is not on the default spelling list,
add it to your own private list, and then use it with
echo hookey | spellout /usr/dict/hlista
echo hookey | spellin /usr/dict/hlista > myhlist
spell -d myhlist <filename>
Options-v Displays words not found in spelling list with all plausible derivations from spelling list.
-b Checks data according to British spelling. Besides preferring centre, colour, speciality, travelled, this option insists
upon -ise instead of -ize in words like standardise.
-x Precedes each word with an equal sign (=) and displays all plausible derivations.
-d hlist Specifies the file used for the spelling list.
-h spellhist Specifies the file used as the history file.
-s hstop Specifies the file used for the stop list.
+local-file Removes words found in local-file from the output of the command. The argument local-file is the name of a file provided by
the user that contains a sorted list of words, one per line. With this option, the user can specify a list of words for a
particular job that are spelled correctly.
The auxiliary files used for the spelling list, stop list, and history file may be specified by arguments following the -d, -s, and -h
options. The default files are indicated below. Copies of all output may be accumulated in the history file. The stop list filters out
misspellings (for example, thier=thy-y+ier) that would otherwise pass.
Restrictions
The coverage of the spelling list is uneven; new installations will probably wish to monitor the output for several months to gather local
additions.
The command works only with ASCII text files.
Files
/usr/dict/hlist[ab] hashed spelling lists, American & British, default for -d
/usr/dict/hstop hashed stop list, default for -s
/dev/null history file, default for -h
/tmp/spell.$$* temporary files
/usr/lib/spell
See Alsoderoff(1), sed(1), sort(1), tee(1)spell(1)