04-27-2009
Adding things in a file and produce a new one
I wanna add a ":" at the end of each line, and i did something like this:
cat Totals | while read ID TOTAL
do
echo "${ID}:${TOTAL}:" >>Totals2
done
File: Totals
12345678:13
21443433:20
The outputs file Totals2 is:
12345678:13::
21443433:20::
but i want
12345678:13:
21443433:20:
so how can i do it?
Thank you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i got these files:
files: Prac1, Prac2, Prac3 (these 3 files have the same format), the format :
Prac1
20693680 10
20179687 9
20781637 5
21907894 6
Prac2
20693680 8
20179687 6
21907894 2
Prac3
20693680 8
21907894 9
file STUDENTS, the format:
20693680:familyname, firstname (10 Replies)
Discussion started by: mingming88
10 Replies
2. Shell Programming and Scripting
hi
i got a file called essay which contain few pages with many paragraphs. now i wanna with PERL to produce another file which called Essaylist that contain a sorted list of words that appear in the file essay.
the format for Essaylist:
$word found $times times on page a b c....
where $word... (3 Replies)
Discussion started by: mingming88
3 Replies
3. Shell Programming and Scripting
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)
Discussion started by: hemo21
7 Replies
4. Shell Programming and Scripting
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Discussion started by: muraliinfy04
4 Replies
5. Shell Programming and Scripting
hi buddies;
ip.txt:
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
...
parameters.txt:
portvalue
username
password
session
... (2 Replies)
Discussion started by: gc_sw
2 Replies
6. Red Hat
Hello
I am trying of a solution to produce date cmnd o/p as:
Feb 18 is the 049 day of the year.
Any ideas how to produce this? (2 Replies)
Discussion started by: ranumala
2 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I have a random test file: test.txt, size: 146
$ ll test.txt
$ 146 test.txt
Take 1:
$ cat test.txt | gzip > test.txt.gz
$ ll test.txt.gz
$ 124 test.txt.gz
Take 2:
$ gzip test.txt
$ ll test.txt.gz
$ 133 test.txt.gz
As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies
8. Shell Programming and Scripting
Hello All,
I am working on a script where I need to fetch the value from a log file and log file creates with different name but few thing are common
DEV_INFOMGT161_MULTI_PTC_BLD01.Stage_All_to_stp2perf1.042312114644.log
STP_12_02_01_00_RC01.Stage_stp-domain_to_stp2perf2.042312041739.log
... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies
9. UNIX for Dummies Questions & Answers
Hi folks!
I have been reading Vahalia's Unix Internals book, which states the following in the chapter dedicated to signals:
Given that, my understanding is that processes running in user mode don't become aware of signals until they switch to kernel mode, where the issig() function is called... (3 Replies)
Discussion started by: Tru69
3 Replies
10. UNIX for Beginners Questions & Answers
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
LEARN ABOUT DEBIAN
wnstats
WNSTATS(7WN) WordNettm WNSTATS(7WN)
NAME
wnstats - WordNet 3.0 database statistics
DESCRIPTION
Number of words, synsets, and senses
+----------+---------+---------+------------------+
| POS | Unique | Synsets | Total |
| | Strings | | Word-Sense Pairs |
+----------+---------+---------+------------------+
|Noun | 117798 | 82115 | 146312 |
|Verb | 11529 | 13767 | 25047 |
|Adjective | 21479 | 18156 | 30002 |
|Adverb | 4481 | 3621 | 5580 |
+----------+---------+---------+------------------+
|Totals | 155287 | 120982 | 206941 |
+----------+---------+---------+------------------+
Polysemy information
+----------+------------------+------------+------------+
| POS | Monosemous | Polysemous | Polysemous |
| | Words and Senses | Words | Senses |
+----------+------------------+------------+------------+
|Noun | 101863 | 15935 | 44449 |
|Verb | 6277 | 5252 | 18770 |
|Adjective | 16503 | 4976 | 14399 |
|Adverb | 3748 | 733 | 1832 |
+----------+------------------+------------+------------+
|Totals | 128391 | 26896 | 79450 |
+----------+------------------+------------+------------+
+----------+----------------------------+----------------------------+
| POS | Average Polysemy | Average Polysemy |
| | Including Monosemous Words | Excluding Monosemous Words |
+----------+----------------------------+----------------------------+
|Noun | 1.24 | 2.79 |
|Verb | 2.17 | 3.57 |
|Adjective | 1.40 | 2.71 |
|Adverb | 1.25 | 2.50 |
+----------+----------------------------+----------------------------+
NOTES
Statistics for all types of adjectives and adjective satellites are combined.
The total of all unique noun, verb, adjective, and adverb strings is actually 147278. However, many strings are unique within a syntactic
category, but are in more than one syntactic category. The figures in the table represent the unique strings in each syntactic category.
WordNet 3.0 Dec 2006 WNSTATS(7WN)