Search Results

Search: Posts Made By: vijay_0209
31,999
Posted By vijay_0209
yes, But I'm afraid to say that for numbers...
yes, But I'm afraid to say that for numbers greater than 10000 this logic may not work out.
31,999
Posted By vijay_0209
awk:How to format a number?
Hello,

I need to format a number..like 12900 should be printed as 12,900
and 1209 as 1,209 and so on. (Just like we do in excel).

Can this be done in awk. any printf options we have?Please...
4,738
Posted By vijay_0209
Radouluv, Can u explain this to me.... ...
Radouluv,

Can u explain this to me....

$acr = 'I LOVE INDIA';
$acr1 = join '', $acr =~ /\b\w/g;
print $acr1;
4,738
Posted By vijay_0209
Thanks everyone, All your replies have been...
Thanks everyone, All your replies have been really helpful!
1,821
Posted By vijay_0209
Thanks Matrixmadhan, Its workin fine!
Thanks Matrixmadhan, Its workin fine!
1,821
Posted By vijay_0209
perl reg-exp
$var1="LEN";
$VAR2="CODLENTT";


now, var2 contains var1(LEN).How do i check this in perl....
whether one string is a part of another..?

if (<logic>)
{
my operation;
}

what'd be the...
4,738
Posted By vijay_0209
ILN is gettin printed on the console....I dont...
ILN is gettin printed on the console....I dont need that

String1 has "I LOVE INDIA"
I want the operation to be performed on string1(the variable) and at the end of it string2 should have ILN

...
4,738
Posted By vijay_0209
String-parsing!
I need the perl solution for the following :

$string="I LOVE INDIA"


now, in a new string i need the first character of each word...

that is string2 should be "ILN".
3,111
Posted By vijay_0209
Thats nice Pludi. But I'd prefer that to be done...
Thats nice Pludi. But I'd prefer that to be done in shell itself
not possible with shell command,awk or sed?
3,111
Posted By vijay_0209
How get numbers only?
I have a file with the following contents..say

123 abc 90and /[abd] 1009

from which i only need numbers to be printed.
like 123 90 1009

using any shell command.

Thanks.
19,278
Posted By vijay_0209
Thanks Whiteboard n gaurvacl... that works...
Thanks Whiteboard n gaurvacl...
that works absolutely fine...great!
19,278
Posted By vijay_0209
are u sure..? grep -vf file1 file2 does not...
are u sure..?

grep -vf file1 file2 does not work as intended.somother solution,please.
19,278
Posted By vijay_0209
for ex: the contents of fileA is A B C ...
for ex: the contents of fileA is
A
B
C

and that of fileB is

A
C

now,diff fileA fileB

would give

2d1
< B

as the output

But i need only the difference not the line info ....
19,278
Posted By vijay_0209
grep -f file1 file2
Wat does this command do?

fileA is a subset of fileB..now, i need to find the lines in fileB that are not in fileA...i.e fileA - fileB.

diff fileA fileB gives the ouput but the format looks no...
1,640
Posted By vijay_0209
Thanks franklin,your post was helpful
Thanks franklin,your post was helpful
1,640
Posted By vijay_0209
Salil, 123 123 234 678 269 1 2 3 4 1 ...
Salil,

123 123 234 678 269 1 2 3 4 1

The above line should be processed by the AWK, as all the fields only have numericals values....


whereas the line

123 123 s 678 269 1 a3 4 1
...
1,640
Posted By vijay_0209
awk - field
I need to check all fields in a line contain only numbers....

for ex....
echo "123 123 234 678 269 1 2 3 4 1" | awk '{for(i=1;i<=NF;i++){<ur logic>}}'


The command should be processed as...
1,358
Posted By vijay_0209
shell scripting...<<$a>>
is there any operator like

<<$a>> in csh or ksh...?

for ex...

echo "<<$a>>";

what does this do...?
6,171
Posted By vijay_0209
| with find -exec
can we use |(pipe operator) with find -exec.....?

or can pipe the output of find command to another command...?

if not, why...?

pls explain
Forum: Programming 11-11-2008
4,211
Posted By vijay_0209
Actually its enough if the value...
Actually its enough if the value satisfies..REG_EXP of


^([[:alpha:]]+[.]? )+(#|# |NO |NO. )?[[:digit:]]

But since it takes much time ...I thought of adding (A){0,1}...wich obviously does not...
Forum: Programming 11-11-2008
4,211
Posted By vijay_0209
Regexp_instr
I need to select all those values with....



REGEXP_INSTR(column_name,'^((A){0,1}[[:alpha:]]+[. | ]?)+[[:digit:]]+[-|/]?[[:digit:]]*$') = 0





But with " ^((A){0,1} " at the begining...
15,799
Posted By vijay_0209
VI editor,column postion
In VI editor ctrl + g is used indicate the line number on which the cursor is placed...similarly is there a way to determine the column number of the cursor position..?
6,866
Posted By vijay_0209
basename $a
basename $a
2,954
Posted By vijay_0209
try this....tell me if this works fine..... ...
try this....tell me if this works fine.....

awk '{
if(NR%3!=0)
{
print
}
else
{
for(i=1;i<=NF;i++)
{
if(i==1)
{
printf("%s ",substr($1,2,length($1)-1))
}
else
{
printf("%s ",$i)
}...
2,233
Posted By vijay_0209
try this... echo e1000g0 | sed 's/[0-9]$//g'
try this...

echo e1000g0 | sed 's/[0-9]$//g'
Showing results 1 to 25 of 54

 
All times are GMT -4. The time now is 07:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy