Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: rveri
1,379
Posted By rveri
Thanks all I got it now . echo "20.03" |...
Thanks all I got it now .

echo "20.03" | awk '{printf "%06.2f\n" , $0 }'
awk 'BEGIN{OFMT="%06.2f";print 20.03}'
printf "%06.2f\n" 20.03

All worked... Thanks.

---------- Post updated at...
Forum: HP-UX 11-10-2014
6,481
Posted By rveri
vmstat 2 10 ##look if you hitting swapping,...
vmstat 2 10 ##look if you hitting swapping, pi/po values should not be non-zero.
model ; swlist -l bundle | grep -e QPK -e GOLD


Have you patched the server to it's applicable patches, how...
9,482
Posted By rveri
carloszhang, Check it out : First n line and...
carloszhang,

Check it out : First n line and last n lines :

n=3;f=file;(head -n $n $f;tail -n $n $f)

with Classic ed:
n=3;printf "1,${n}p\n\$-${n}+,\$p\nq\n"|ed -s file
7,975
Posted By rveri
BrentBANKS, so far looks good, You dont have...
BrentBANKS,
so far looks good,
You dont have any filesystem in the floppy disk yet, so it complains about filesystem , You should be able to mount it after formatting the disk with correct format....
6,534
Posted By rveri
Hi eskay, For an example to find 19 years...
Hi eskay,

For an example to find 19 years old file:

y=19;t=`echo $y*365|bc`;find . -type f -mtime +"$t" -exec ls -l {} \;

-rwxrw-r-x 1 root sys 695 May 10 1994 ./file1...
5,079
Posted By rveri
Hi madrazzii, Check this out: awk...
Hi madrazzii,
Check this out:
awk '{if($0~/PROCEDURES/) print >"PROCEDURES.TXT" ; if ($0~/CODES/) print >"CODES.txt" }' EDIT.txt
2,131
Posted By rveri
happypoker, You can use gnu awk and use array...
happypoker,
You can use gnu awk and use array for the desired columns to store and print the data.
2,741
Posted By rveri
Hi bbaumg02, Here you go, with classic ed, ...
Hi bbaumg02,

Here you go, with classic ed,

ls --sort=extension > directory.txt
echo "Enter you user name..."
read input
printf "1i\n$input\n.\nw\nq" | ed -s directory.txt

date=`date`...
1,407
Posted By rveri
Yoda Thanks, Correction. I saw the lines were...
Yoda Thanks,
Correction. I saw the lines were different so it is working as per the logic I had given.

---------- Post updated at 12:46 PM ---------- Previous update was at 12:39 PM ----------...
2,676
Posted By rveri
Khaled79, Check this out: # v=45654;perl...
Khaled79,
Check this out:
# v=45654;perl -0777 -pe 's/$ENV{v}\n199\n225/$ENV{v}\n258/igs' file


235543
123
45654
258
578
45654
258
763
Posted By rveri
Hi nua7 , >Is there a way in awk that the field...
Hi nua7 ,
>Is there a way in awk that the field can be converted to a 10 digit field so that total amount =0000000700
- check this out:

echo "700" | awk '{printf "%010d\n",$0}'
0000000700
1,487
Posted By rveri
got it bipinajith thanks, > This is why we...
got it bipinajith thanks,
> This is why we have to reverse the lines of the file first, then remove the duplicate and finally reverse the lines back.

Here it is to remove 1st occurrence of the...
3,325
Posted By rveri
bipinajith, This worked great, could you...
bipinajith,
This worked great,
could you please explain a bit this portion , I am unable to unerstand how you got the 3 octet only outof 4 + ":" , with the sub(/\.[0-9]+:.*/,x,$4);

Thanks,
...
1,900
Posted By rveri
README: Factorial quick chart with sed & bc:
Hi all,
While doing some checks I found a kind of interesting arithmetic factorial chart with sed, sharing this may be simple but thought to share,



# n=20;for i in `seq $n`;do printf "`seq...
Showing results 1 to 14 of 14

 

Featured Tech Videos

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