Damn…
when project upgrade veritas netbackup from 5.0 to 6.0 never shown their progress.
and the database archive log was grown rapidly, so for the quickly action, I build this script.
works on HP-UX environments
#!/usr/bin/sh
# moving archive log
#####################################
bdf -l /oracle/archivelog | grep -iv Filesystem |awk '{print $6" "$5}' | while
read LINE; do
ASS=`echo $LINE | cut -d"%" -f1 | awk '{ print $2 }'`
if [ $ASS -gt 95 ]; then
/usr/bin/find /oracle/archivelog -name "*.arc" -type f -exec mv {} /backup/archive_may/ \;
fi
done
combination with the crontab..
$ crontab -l
* * * * * sh /scripting/arsip.sh >/dev/null 2>&1
Simple, stupid but deadly.
myprends Say: “Dra..bikinin script terbilang di C dong ntar sore gue ambil ya..”
padahal lagi bikinin webnya bascomp, but karena doi yang minta ya mo ga mau..
,
Script dibawah berhasil dijalankan di borland turbo C
#include <stdio.h>
#include <conio.h>
char StrBilangan[10][10] =
{"nol","satu","dua","tiga","empat","lima","enam",<br />"tujuh","delapan","sembilan"};
void SaySatuan(char nilai)
{ printf("%s",StrBilangan[nilai]);
}
void SayPuluhan(char nilai)
{ if (nilai < 10)
SaySatuan(nilai);
else
{
if (nilai == 10)
printf("sepuluh");
if (nilai == 11)
printf("sebelas");
if (nilai >= 12 && nilai < = 19)
{
SaySatuan(nilai % 10);
printf("belas");
}
if (nilai >= 20 && nilai < = 99)
{
SaySatuan(nilai / 10);
printf(" puluh ");
}
}
}
void SayRatusan(int nilai)
{ if (nilai < 100)
SayPuluhan(nilai);
else
{
if(nilai >= 100 && nilai < = 199)
printf("seratus ");
if (nilai >= 200 && nilai < = 999)
{
SaySatuan(nilai / 100);
printf(" ratus ");
}
if(nilai % 100 != 0)
SayPuluhan(nilai % 100);
}
}
void SayRibuan(unsigned long nilai)
{ if (nilai %lt; 1000)
SayRatusan(nilai);
else
{
if (nilai >= 1000 && nilai < = 1999)
printf("Seribu ");
if (nilai >= 2000 && nilai < = 999999)
{
SayRatusan(nilai/1000);
printf(" ribu ");
}
if (nilai % 1000 != 0)
SayRatusan(nilai % 1000);
}
}
void SayJuta(unsigned long nilai)
{ if (nilai < 1000000)
SayRibuan(nilai);
else
{
SayRatusan(nilai / 1000000);
printf(" juta ");
if(nilai % 1000000 != 0)
SayRibuan(nilai % 1000000);
}
}
void SayMilyar(unsigned long nilai)
{ if (nilai < 1000000000)
SayJuta(nilai);
else
{
SayRatusan(nilai / 1000000000);
printf(" Milyar ");
if(nilai % 1000000000 != 0)
SayJuta(nilai % 1000000000);
}
}
void SayBilangan(unsigned long nilai)
{
if (nilai <= 9)
SaySatuan(nilai);
if (nilai >= 10 && nilai < = 99)
SayPuluhan(nilai);
if (nilai >= 100 && nilai < = 999)
SayRatusan(nilai);
if(nilai >= 1000 && nilai < = 999999)
SayRibuan(nilai);
if(nilai >= 1000000 && nilai < = 999999999)
SayJuta(nilai);
if(nilai >= 1000000000)
SayMilyar(nilai);
}
void main(void)
{
int angka;
clrscr();
printf("Masukkan Angka : ");
scanf("%d", &angka );
printf("Terbilangnya adalah :");
SayBilangan(angka);
getch();
printf("\n");
}
untuk versi Visual C nya Pindahkan clrscr(); dibawah #include <conio.h>, lalu compile..tara
Ket:
Terima kasih untuk “I Putu Gede Darmawan” atas scriptnya meski terjadi error pada puluhan
seperti “20″ yang terbilang menjadi “dua puluh nol”, “Iw4n_primus << tengs men”,
but dah oke ko..malah sekarang gue tambahin inputannya..
Option Explicit Dim objNetwork, strRemotePath1, strRemotePath2 Dim strDriveLetter1, strDriveLetter2
strDriveLetter1 = “L:”
strDriveLetter2 = “M:”
strRemotePath1 = “\\<nama server>\<folder sharing>”
strRemotePath2 = “\\<nama server>\<folder sharing>”
Set objNetwork = CreateObject("WScript.Network") objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1 objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
Wscript.Quit
simpan dengan extension .vbs,
kalo mo ditambahkan Network drivenya lagi tinggal tambahkan parameter “strDriveLetter”
dan “strRemotePath” aja..,
Script ini aku tambahkan pada “use config>windows setting>script(logon/logoff)>logon>add-ORganization Unit” kantorku..
kalo bisa usahain networkdrive tersebut sudah di DFS kan agar server ga kedodoran
Right Click on many Operating System like window$ was too facilitate to us who work with GUI/Office Application, Can u imagine if no right click in window$
,
This Trick Just very simple, Just edit the registry key and tara…done..
uuppss..this trick i’ll try on windows 2003 sever and work’s on windows NT to UP
Before that you must pray with your religion and backup the registry with “export” and save with *.reg extension.
The Trick Are
1. click start > run > regedt32
2. choose [HKEY_CLASSES_ROOT\Directory\Shell]
3. right click on Shell key, choose New Key
4. make a program or application name which would run when right click on start button, ex: [Notepad]
5. in the Notepad, make a new key called [command]
6. in [command] value, added path the program / application that u add at the top, ex: [notepad] –>path [C:\windows\notepad.exe]
(more…)