Search Results

Search: Posts Made By: PranavEcstasy
2,030
Posted By PranavEcstasy
Perl 5.6.1
This thread module needs perl 5.8 or above. Is there any way i can use threas in perl 5.6.1...???
2,030
Posted By PranavEcstasy
Thanks
thanks for your help sir,

I did this code in linux but now i am trying to run it on sunOS and its giving me error could not find threads.pm in @INC.

Do I have to install...
2,030
Posted By PranavEcstasy
understanding thread in perl
Hi all,

I am trying to build threads which will go to localhost and list the files in given folder.


#!/usr/bin/perl
use threads;
my $t1 = threads->new(\&sub1, 1);
my $t2...
17,594
Posted By PranavEcstasy
Thanks
Thanks Surendran, Arun it worked perfectly.

@Elixir, I am using Bash shell sir. and i will be very grateful if you could please explain what difference $@ and $* did to the code.
17,594
Posted By PranavEcstasy
Thanks Elixir, But this code is giving me error. ...
Thanks Elixir, But this code is giving me error.


./add.sh: line 1: set: -A: invalid option
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
sum is : 0



I am using...
17,594
Posted By PranavEcstasy
Command line arguments for addition
Hi all,
I am trying to write a code for addition of n numbers which will be passed by the user as command line arguments.

I wrote the following code.


add=0
for (( i = 1 ; i <= $# ;...
2,056
Posted By PranavEcstasy
thanks for the suggestion sir, but i am not...
thanks for the suggestion sir, but i am not talking about formating the input when we print. Because the input data can vary dynamically.
I m talking about proper table generation.

something...
2,056
Posted By PranavEcstasy
Table / Boxes Generation in PERL
Hi all,
I was wondering, if there is any way to generate boxes/tables using perl to represent some data in better format.

input :

Name SAlary
pranav 10000
ajay 5000
shri 15000

...
1,443
Posted By PranavEcstasy
yes, sorry.... I bymistake wrote [\code]...
yes, sorry....
I bymistake wrote [\code] instead of [/code] at the end and so it didnt work, but i edited as soon as i noticed....
1,443
Posted By PranavEcstasy
Math Tool
Hi all,
I am new to PERL scripts, and i have made my first script which i am posting here.
This math tool performs all basic arithmatic functions.



#!/usr/bin/perl
print...
85,544
Posted By PranavEcstasy
try this one : awk -F ""...
try this one :


awk -F "" '{gsub(".","Y",$150)}1' OFS="" infile




n for column :


$ awk '{gsub($2,$2"=",$2)}1' infile
1,913
Posted By PranavEcstasy
Try this one : $ awk '{sub("Ports:...
Try this one :


$ awk '{sub("Ports: ",""); gsub(", ","\n");print > "outfile"}' infile
1,163
Posted By PranavEcstasy
a doubt in awk
instead of writing print command in awk, i saw in some posts that we can simply write a number before we end the awk command and it will print the file.

As given below:


$awk '{some...
2,560
Posted By PranavEcstasy
You using wrong field seperator friend. Try...
You using wrong field seperator friend.
Try using this one :


$ awk -F\| 'OFS=FS {gsub(" ","",$2);print}' test


Input :

$ cat test
abc|bd |bkd123
abc|badf |asdasf132e2
abc|bqe ...
3,141
Posted By PranavEcstasy
modify this code
hi,
This is not the exact output you were expecting, but see if this code can help.



awk '{
if ( $4 < 1000000) print "bin1 :" $0
else if ($4 >= 1000000 && $4 < 2000000) print "bin2 :" $0...
1,217
Posted By PranavEcstasy
use pipe
ls | sort

try using the above command....
1,598
Posted By PranavEcstasy
Thanks
Thank you elixir, it worked...
15,734
Posted By PranavEcstasy
Acess Control List
When you apply permissions to the file using Access Control List (ACL), that + sign appears.
It is usually done by the root user.
An ACL specifies, which user or system has granted access to some...
1,598
Posted By PranavEcstasy
Printing records in different format
Hi all,
I have a input file say record.txt

hostname IP_address Port_No Version
A 10.10.10.1 80 6.02
B 10.10.10.2 81 6.03
C 10.10.10.3 82 6.04

row 1 has 4 field headings : hostname,...
Showing results 1 to 19 of 19

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