10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am revisiting the problem of sentence splitting. I have a Perl Script which splits a para into sentences, but acronyms and short forms create an issue
#!/usr/bin/perl
use feature qw/say/;
use strict;
use warnings;
my $s;
my @arr;
while(<>) {
chomp $_;
$s .= $_ . " ";
}
@arr... (2 Replies)
Discussion started by: gimley
2 Replies
2. Shell Programming and Scripting
I am compiling a synonym dictionary which has the following structure
Headword=Synonym1,Synonym2 and so on, with each synonym separated by a comma.
As is usual in such cases manual preparation of synonyms results in repeating the synonym which results in dupes as in the example below:... (3 Replies)
Discussion started by: gimley
3 Replies
3. Shell Programming and Scripting
Hi,
I have a input string 0000106 I need to extract the number after leading zeros ie the number 106. I used the command tr -d "0" and got the output as 16. Could any one of you please help me in using the tr command to get the output 106. Thanks in advance.... (2 Replies)
Discussion started by: dean_amrita
2 Replies
4. Shell Programming and Scripting
Hi Friends,
I would like to left pad with "0's" on first column say (width six)
I have a large file with the format:
FILE:
1: ALFRED 84378 NY
8385: JAMES 88385 FL
323: SMITH 00850 TX
My output needs to be like:
000001: ALFRED 84378 NY
008385: JAMES 88385 FL
000323: SMITH... (10 Replies)
Discussion started by: sbasetty
10 Replies
5. UNIX for Advanced & Expert Users
Hi,
I want to trim +with leading zero's with amount fields.I know using awk for trimming leading zeros with +,but I want get the entire row itself.
cat file_name |awk -F " " '{printf "%14.4f%f\n",$4}'
ex:
10 xyz bc +00000234.4500
20 yzx foxic +002456.000
Expexted
10 xyz bc... (3 Replies)
Discussion started by: mohan705
3 Replies
6. UNIX for Dummies Questions & Answers
Hi
A question about numeric display there...
Is there any option in awk that would prints a number with "left filled with zero" format, and how does it work with variable length definition?
For instance IŽd like my variable to be left filled with 0s for a length of 3 in total:
4 would be... (3 Replies)
Discussion started by: Indalecio
3 Replies
7. Shell Programming and Scripting
Pad zeros to a number and assign it to a variable
like i get 1 in $i ,i want it to be $i as 01 (6 Replies)
Discussion started by: anumkoshy
6 Replies
8. UNIX for Dummies Questions & Answers
Hi can I know command to pad Zeros to a value
I get 16 and I need to send 0000000016 (5 Replies)
Discussion started by: mgirinath
5 Replies
9. Shell Programming and Scripting
How to insert leading zeros into a left-justisfied zip code?
e.g. Zip code is written as 60320 which is left-justified to make it be read as 0060320.
We have to move it to right-justifiable then insert 2 leading zeros into it... ;) (1 Reply)
Discussion started by: wtofu
1 Replies
10. UNIX for Dummies Questions & Answers
I need to find to find duplicate lines in a document and then print the line numbers of the duplicates
The files contain multiple lines with about 100 numbers on each line I need something that will output the line numbers where duplicates were found ie 1=5=7, 2=34=76
Any suggestions would be... (5 Replies)
Discussion started by: stresslog
5 Replies