Hello,
I need help with a program I'm trying to write for my moms science class, what it has to do is accept a user inputed string and search for it in a text file (file contains all the elements)
The file looks like:
H Hydrogen 1
He Helium 2
Li Lithium 3
Be Beryllium 4
...
If the... (1 Reply)
Hello,
I need help with a program I'm trying to write for my moms science class, what it has to do is accept a user inputed string and search for it in a text file (file contains all the elements)
The file looks like:
H Hydrogen 1
He Helium 2
Li Lithium 3
Be Beryllium 4
...
If the... (0 Replies)
Hi Champs,
I am a newbie to unix world, and I am trying to built a script which seems to be far tough to be done alone by me.....
" I am having a raw csv file which contains around 50 fields..."
From that file I have to grep 2 fields "A" and "B"....field "A" is to be aligned vertically... (11 Replies)
Right now, my code is:
s/Secondary Ins./Secondary Ins.\
1/g
It's adding a 1 as soon as it finds Secondary Ins.
Primary Ins.: MEDICARE B DMERC Secondary Ins.
1: CONTINENTAL LIFE INS
What I really want to achieve is having a 1 added on the next line that contain "Secondary Ins." It... (4 Replies)
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Hi,
I need to replace and append a string in a text if grep is true. For eg:
grep ABC test.txt | grep -v '\.$' | awk {'print $4'} | sed "s/ ?
How do I replace all instances of "print $4" using sed with another sring? Eg of the string returned will be,
lx123
web222
xyz
Want to... (8 Replies)
Hi ,
I have a file likeA-0044150|ABC/Frito/
A-0044150|GFHU
A-0150075|Bud Racing
A-0187811|Bud Light
A-0187811|RW&B signmaking
I Want the o/p likeA-0044150|ABC/Frito/,GFHU
A-0150075|Bud Racing
A-0187811|Bud Light,RW&B signmaking (2 Replies)
Hi All,
I'm trying to insert a string into a file at a specific location.
I'd like to add a string after the parent::__construct(); in my file.
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Controller extends CI_Controller {
function... (6 Replies)
Hi Friends,
Good morning.
Appended a particular string after occurrence of particular string in a file.
my file abc.sql as below
create or replace function f1(p_cust_no IN VARCHAR)
RETURN number IS
DECLARE
v_country country.customer_tbl%TYPE;
begin
begin
select... (4 Replies)
Discussion started by: ram0106
4 Replies
LEARN ABOUT DEBIAN
mmseg
MMSEG(1) User Contributed Perl Documentation MMSEG(1)NAME
mmseg - maximum matching segment Chinese text.
SYNOPSIS
mmseg -d dict_file [option]... [corpus_file]...
DESCRIPTION
mmseg is a tool for segmenting Chinese text into words using maximum matching algorithm. mmseg segments corpus_file, or standard input if
no filename is specified, and write the segmented result to standard output.
OPTIONS -d dict_file
Use dict_file as lexicon. A default lexicon can be found at /usr/share/sunpinyin-slm/dict.utf8.
-f,--format (text|bin)
Output Format, can be 'text' or 'bin'. default 'bin'. Normally, in text mode, word text are output, while in binary mode, binary short
integer of the word-ids are written to stdout.
-s, --stok STOK_ID
Sentence token id. Default 10. It will be written to output in binary mode after every sentence.
-i, --show-id
Show Id info. Under text output format mode, attach id after known words. If under binary mode, print id(s) in text.
-a, --ambiguious-id AMBI-ID
Ambiguious means ABC => A BC or AB C. If specified (AMBI-ID != 0), The sequence ABC will not be segmented, in binary mode, the AMBI-ID
is written out; in text mode, "<ambi>ABC</ambi>" will be output. Default is 0.
NOTES
Under binary mode, consecutive id of 0 are merged into one 0. Under text mode, no space are inserted between unknown-words.
AUTHOR
Originally written by Phill.Zhang <phill.zhang@sun.com>. Currently maintained by Kov.Chai <tchaikov@gmail.com>.
SEE ALSO slmseg(1), ids2ngram (1).
perl v5.14.2 2012-06-09 MMSEG(1)