Search Results

Search: Posts Made By: shellwell
1,560
Posted By shellwell
Thanks. It worked.
Thanks. It worked.
1,560
Posted By shellwell
array of hash - perl
How do I get the unique hashes from an array of hashes?

@ar1 = ( {a=>1,b=>2}, {c=>3,d=>4},{a=>1,b=>2});I need :
@ar2 = ( {a=>1,b=>2}, {c=>3,d=>4});Thanks.
1,122
Posted By shellwell
reverse the file content blockwise
Hi,

I am having a file with some data present in blocks
e.g.

----------------
some data
some more data
couple of more lines.
----------------
another set of data
more lines...
1,274
Posted By shellwell
Thanks a lot. I want to implement this inside...
Thanks a lot.
I want to implement this inside the script itself.
will try it first and if needed I will ask.

Thanks again.
1,274
Posted By shellwell
sort - perl
Hi,

can I sort the fields on the basis of dates in the following format?

from this

Dec 17 2007 2:18:18:000PM
Dec 17 2007 5:18:18:000AM
Jan 19 2009 4:30:02:000AM
Mar 21 2010 ...
2,803
Posted By shellwell
alignment
Hi,

I am having a file with with format.
however, for longer xml, the xml code has been truncated like this.

F1 |###################### |String1 ...
3,400
Posted By shellwell
it is the sybase bcp command. if for some...
it is the sybase bcp command.

if for some reason ( say login incorrect ), the bcp fails, I dont want to move futher.


bcp $DB..table1 in file1 -c -t, -S${server} -U${user} -P${pass} || DoExit...
3,400
Posted By shellwell
Hi, Thanks for reply. if i put directly...
Hi, Thanks for reply.

if i put directly exit. then also it is not exiting from the script.
further commands are still get executed.


some commands
if [ $? -eq 0 ];then
exit
fi
echo...
3,400
Posted By shellwell
Hi, DoExit() { if [ $# -eq 1 ];...
Hi,


DoExit()
{
if [ $# -eq 1 ]; then
ExitCode=$1
echo "FAIL"
exit ${ExitCode}
else
ExitCode=0
exit ${ExitCode}
fi
}

F1 () {

some...
3,400
Posted By shellwell
exiting from script
Hi,

I am trying to exit the script from a function.
I was in assumption that if we use exit ( inside or outside the function) it will exit from the script.

alternatively, return will exit from...
2,568
Posted By shellwell
Hi, The mail queue problem could be...
Hi,

The mail queue problem could be possible but I tried the above solution but unfortunately it didnt work.

How can I clear the mail Queue?
2,568
Posted By shellwell
mailx issue -
Hi,

I am sending mail inside my script based on various conditions.

Here is the problem,

when there are more than one condion at a time, the mailx adds the messages into one ( at the time of...
3,787
Posted By shellwell
variable scope
Hi,
I want to know about the variable scope in shell script.

How can we use the script argument inside the function?

fn () {
echo $1 ## I want this argument should be the main script...
4,353
Posted By shellwell
awk - array elements as condition
Hi,

can I use array elements ( all ) in conditional statements?
the problem is ,the total number of elements is not known.

e.g

A is an array with elements - 1,2,3

now if i want to test...
1,856
Posted By shellwell
hi. actually I have a directory tree and...
hi.

actually I have a directory tree and inside that i have the same subdir..

like..

X is a main dir.
and there are A,B,C sub dir and inside that two dir for each of A,B,C

X/A/aa
X/A/bb...
1,856
Posted By shellwell
ftp files in perl
Hi,

I am using NET::FTP in perl to tranfer files.
i have an array of files



and then I m getting one bye one using foreach.

the problem is I m not gettng the complete list of files....
7,423
Posted By shellwell
getting file owner in perl
hi,
how can I get the owner of the file ( not uid) on windows plaform.

"getpwuid" is not working on windows. I knw it works on unix.

Thanks.
4,404
Posted By shellwell
Thanks redoubtable. It worked. I hadn't thought...
Thanks redoubtable.
It worked. I hadn't thought about that.

Thanks again.
4,404
Posted By shellwell
number check in perl
Hi,,



this is returning true in all cases..( other than 10 dig number also)
what could be wrong??
2,425
Posted By shellwell
perl - reading from a file conditionally
Hi,

I am new to perl.
I want to read from a file on the basis of some conditions..

I want to define parameters in a configuration file in such a manner like...


etc..

in my perl script,...
Showing results 1 to 20 of 20

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