If the digits are on the same line, you can use grep \(.\) matches one character and saves a reference #1, .* means zero or more characters, \1 means that #1 re-occurs.
This User Gave Thanks to MadeInGermany For This Post:
Hi, I know that inode for each file is unique, but is it the for the directory? So far I found different directories has the same inode nubmer when you do ls -i, could some one explain why? Thanks a lot. (9 Replies)
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)
Hello,
In korn-shell, how can I do to have an unique number for a date done.
I want to use it to have the number of days between two dates.
Thanks in advance. (4 Replies)
I'd like to be able to identify in which column a string occurs. So far I know that I can tell how many columns there are and how to return a specific column:
$ sar -r | grep 'kbswpcad' | awk 'NF = 9 { print $NF }'
%swpused
I've even managed to get the columns to output to an array but I... (2 Replies)
Hi,
how i can display all the unique number from my random number script below;
#!/usr/bin/perl
use strict;
my @alphanum = ( 'A' .. 'Z', 'a' .. 'z', 0 .. 9);
my $random = join('', map($alphanum,(1..5)));
print "$random\n";
Thank You. (1 Reply)
Wrote a script to create a hidden account in OS X. It works perfect but I need to check if the UID is already in use before I tried to create the account.
dscl . list /Users UniqueID | awk '{print $2}' | while read UIDS
do
if ; then
echo "UID Is Already in USE"
i=`expr "$2" - 1`
echo... (4 Replies)
input
a 1
a 2
a -1
b 1
b 2
b 3
output
a -1
b 1
Thanx
---------- Post updated at 09:42 PM ---------- Previous update was at 09:10 PM ----------
Ok I managed it (7 Replies)
In Bash using AWK or sed I need to convert the following file:
...
numitem_tab0 =<p>1 KEYWORD</p><p>2 KEYWORD</p><p>3 KEYWORD</p><p>4 KEYWORD</p><p>5 KEYWORD</p>...<p>25 KEYWORD</p>
subitem_tab0 =<p></p><p></p>
...
numitem_tab6 =<p>1 KEYWORD</p><p>2 KEYWORD</p><p>3 KEYWORD</p><p>4 KEYWORD</p>... (2 Replies)
Hello,
I have a database of name variants with the following structure:
variant=variant=variant
The number of variants can be as many as thirty to forty.
Since the database is quite large (at present around 60,000 lines) duplicate sets of variants creep in. Thus
John=Johann=Jon
and... (2 Replies)