Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: pmm
Forum: Solaris 12-21-2011
5,993
Posted By pmm
change to: 30 13 * * 1-5 $HOME/my_script.sh >...
change to:
30 13 * * 1-5 $HOME/my_script.sh > $HOME/my_script.log 2>&2
to get stdout and stderr output.
I have seen this before - where the environment is NOT set up correctly when running from...
999
Posted By pmm
cat `ls *.dis` > intree2
cat `ls *.dis` > intree2
1,494
Posted By pmm
Assuming you want the last record in the file. ...
Assuming you want the last record in the file.

Date=`tail -1 filename|cut -d\| -f15|awk ' { print $1 } '`
Time=`tail -1 filename|cut -d\| -f15|awk ' { print substr($2,1,8) } '`
1,164
Posted By pmm
nawk ' { A[FILENAME]+=$1; N[FILENAME]++ } END...
nawk '
{ A[FILENAME]+=$1; N[FILENAME]++ }
END { for ( i in A ) { REC=REC A[i]/N[i]" " }
print REC } ' a1.txt a2.txt a3.txt
Forum: Solaris 10-01-2010
4,014
Posted By pmm
Printing to HP Laserjet M1212nf MFP
Server: Solaris 10

Have a HP Laserjet M1212nf MFP attached to a PC on tcp/ip connected to USB port.

Has anyone tried to print to this printer from Solaris? Not using CUPS.

netpr command...
27,683
Posted By pmm
Not an option to printf but, I found this: ...
Not an option to printf but, I found this:



echo 1234 | nawk ' { printf("This should have commas: %d,%d\n",$0/1000,$0%1000); } '


This should have commas: 1,234
Forum: Solaris 10-21-2009
5,738
Posted By pmm
Solved Thanks for the 'simple' advise. Swap...
Solved

Thanks for the 'simple' advise. Swap was indeed the problem, we upped it to twice the RAM size and I can now run 3 JBoss instances on the same Solaris 10 server.

Thanks jlliagre
Forum: Solaris 10-20-2009
5,738
Posted By pmm
Hi Guys My point is that the application...
Hi Guys

My point is that the application works correctly in a NON-ZONED Solaris 10 server with 2GB, but in a zoned environment I am getting the failure as stated (truss ENOMEM).

Are there any...
Forum: Solaris 10-15-2009
5,738
Posted By pmm
Sorry for the confusion with terminology, but, I...
Sorry for the confusion with terminology, but, I am running one non-global zone with JBOSS App Server running as 2 separate instances (server 1 and server2) on the same Solaris server.

There are...
Forum: Solaris 10-15-2009
5,738
Posted By pmm
Java Solaris 10 Zone settings
I have the following situation

1) Start JBoss Server 1
2) Within application - print as normal
3) Start JBoss Server 2

4) Printing STOPS on Server 1; Printing does NOT WORK on Server 2
...
Forum: Solaris 07-27-2009
2,460
Posted By pmm
Entry in /etc/inetd.conf: # # Print...
Entry in /etc/inetd.conf:

#
# Print Protocol Adaptor - BSD listener
#
printer stream tcp6 nowait root /usr/lib/print/in.lpd in.lpd

Output from ps -ef|grep lp

root...
Forum: Solaris 07-22-2009
2,460
Posted By pmm
Printer Entries stuck "finished printing"
On Solaris 8, when I do a lpstat -o:



I have tried cancel 140828p-16974, but the entries remain



New prints to this printer and others work successfully.

Can anyone suggest how to...
5,238
Posted By pmm
printf "%s" "Please Enter Username:" read auser...
printf "%s" "Please Enter Username:"
read auser

printf "%s" "Please Enter Password:"
stty -echo
read apassword

This suppresses printing of password altogether.
1,688
Posted By pmm
Assuming above is 2 records (i.e. not 4 records):...
Assuming above is 2 records (i.e. not 4 records):
269091 123443124 how are slkslks, serial no is 042890000 and pincode is 090001223433454
269091 123443124 how are slkslks, Sr/no is 0428901 and 14...
3,135
Posted By pmm
@view_lista = `cleartool lsview -short | egrep...
@view_lista = `cleartool lsview -short | egrep '^a'`;

i.e. put ^a in quotes ' '
5,626
Posted By pmm
awk ' { if ( F[$2] == "" ) F[$2]=$1; if ( $1 >...
awk ' { if ( F[$2] == "" ) F[$2]=$1; if ( $1 > L[$2] ) L[$2]=$1 } END { for ( i in F ) print i " First= " F[i] " Last= " L[i] } '
1,818
Posted By pmm
printf "Read Variable: " read var nawk...
printf "Read Variable: "
read var

nawk -F\| -v X=$var '
{ if ( NR == 1 )
{ for ( i=1; i<=NF; i++ )
H[i]=$i
HNF=NF }
}
{ if ( $1 == X )
{ print $0; for (...
1,167
Posted By pmm
for i in `ls file[12345]` do scp $i...
for i in `ls file[12345]`
do
scp $i user@prod_server:$i
done
2,770
Posted By pmm
nawk -F\| ' function zdate (date) { ...
nawk -F\| '
function zdate (date)
{
cnt=split(date,D,"-")
if ( cnt == 3 )
{
for (i=1; i<=cnt; i++ )
if ( length(D[i]) == 1 ) D[i]="0"D[i]
...
2,541
Posted By pmm
Following on your awk script - use printf: ...
Following on your awk script - use printf:

awk '/Diags begin/{getline;printf};{if ($2=="(123)") print ","$1,$2,$3,$4}'
36,430
Posted By pmm
nawk -F, ' { if ( FILENAME == "file1" ) ...
nawk -F, '
{ if ( FILENAME == "file1" )
_[$3]=$0
else
_[$3]=_[$3]","$1 }
END { for ( i in _ ) print _[i] }
' file1 file2
4,550
Posted By pmm
nawk ' { if ( FILENAME == "file1" ) _[FNR]=$0 ...
nawk '
{ if ( FILENAME == "file1" ) _[FNR]=$0
if ( FILENAME == "file2" && _[FNR] == "Unnamed" ) _[FNR]=$0
}
END { for ( i=1; i<= FNR; i++ ) print _[i] }
' file1 file2 > file3
2,511
Posted By pmm
man export
man export
3,357
Posted By pmm
One way is : YESTERDAY=`perl -e...
One way is :

YESTERDAY=`perl -e '@T=localtime(time-'86400');printf("%02d-%02d-%02d %02d:%02d:%02d ",($T[5]+1900,$T[4]+1,$T[3],$T[2],$T[1],$T[0]))'`

Then use this YESTERDAY variable as using -v...
1,777
Posted By pmm
tail -1000 sample.log| awk '...
tail -1000 sample.log| awk ' /OutOfMemoryException/ { print; CNT++ } END { print "Record Count = " CNT } '
Showing results 1 to 25 of 56

 

Featured Tech Videos

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