1.To count the number of words in a string which are separated with special charters like ,
# echo "apple,mango,orange,goa" | awk -F, '{print NF}'2.How to create and print the continuous variables in a loop after assigning the values to them
4
i=03.in the nslookup <IP> output print only Valid hostname of that IP
temp="MYTEMP"
echo $temp
while [ $i -le 4 ]
do
let i="i+1"
eval DYNVAR${i}=$temp$i
eval echo "Value in DYNVAR$i is \$DYNVAR$i "
done
nc041031:~ # nslookup 9.48.185.207 | awk '/=/ {print $4}'4.in nslookup <Hostname> print only the valid IP of the corresponding host
nc185207.tivlab.austin.ibm.com.
nc041031:~ # nslookup nc185207.tivlab.austin.ibm.com. | awk '/Address:/ {print $2}' | grep -v "#"5.Cont ...
9.48.185.207
Technorati Tags: awk.sed, shell scripting, unix, one liners
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jan 8 00:41:36 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/home/oracle/oracle/product/10.2.0/db_1/dbs/initdb_2orcl.ora'
If you are facing the above error while startup of oracle , possible reasons might be the init{ORA_SID}.ora file not accessible by oracle user which may be due to the init{ORA_SID}.ora file is not located in the default locations or it is not having the proper file permissions to read by oracle user.
In the abobe error messages the ORACLE_SID is db_2orcl, so the name of the init{ORA_SID}.ora file has become initdb_2orcl.ora. So the file might not be available in the default location.
Possible locations to locate init.ora file are as follows
$ORACLE_BASE/admin/$ORACLE_SID/pfile folder
[ or ]
$ORACLE_HOME/dbs folder
Check the name and location of the init-ora file. Then when starting the database specify explicity the location of the initialization file, i.e.
Startup pfile='<full-pathname-of-initialisation-file>'
Example :
SQL> startup pfile='/home/oracle/oracle/product/10.2.0/db_1/admin/db_2orcl/pfile/init.ora.8220089359'
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218292 bytes
Variable Size 62916876 bytes
Database Buffers 96468992 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
SQL> select count(*) from tab;
COUNT(*)
----------
3663
SQL> quit
Reference : [1][2][3]
Oracle Basic FAQs
Technorati Tags: LRM-00109:, ORA-01078:
Java Predefined-Functional Interfaces
Java provides predefined functional interfaces to deal with functional programming by using lambda and method references.
You can also define your own custom functional interface. Following is the list of functional interface which are placed in java.util.function package.
Supplier, Consumer , Function Predicate etc.
Interface is a group of related methods with empty bodies(Signatures). It is not a class. One class may implements multiple interfaces thus helps to achieve multiple inheritance. All the methods in interface are by default abstract with out any abstract key word.
Examples for interface :
interface vehicle {
void startVehicle(Sting commandToStart);
void stopVehicle(String commandToStop);
void speedUp(int speed);
}
to implement the above interface we can have mutiple classes like Bycycle, MotorBike, Car etc.
class MotorB{
}
Abstract Class :
A class declared as abstract - It may or may not contain abstract methods. It can't be instantiated but can be subclassed. Means an abstract class can only be subclassed which mean it can be inherited from. In simple words other classes can inherit an abstract class but they can't initiate the abstract class. One class can extend only one abstract class.
Abstract method :
An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this:Abstract classes are classes that contain one or more abstract methods.
Example:
public abstract class vehicle{
//Non abstract method
void int speedUp(int speed){
spedd = speed + 10 ;
}
abstract void stopVehicle(String commandToStop);
}
public class thunderBird extends vehicle{
void stopVehicle(String commandToStop)
{
commandToStop;
}
}
So in the above abstract class vehicle there are two methods one is speedUp which is non-abstract method and one abstract method stopVehicle . So the classes that extend this abstract class must define the abstract methods declared in abstract class other wise the class itself must declared as abstract class again.
An abstract method is a method that is declared, but contains no implementation.
Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods.
An Abstract class without any implementation just looks like an Interface.
Abstract class can implement interface ..
abstract class jumbo implements vehicle {
void startVehicle(Sting commandToStart){
start ;
}
void stopVehicle(String commandToStop){
stop ;
}
void speedUp(int speed){
speed = speed + 20;
}
}
Refer some more pages on the same topic here [1][2][3][4]
Popular Posts
-
The best solution to know about these init levels is to understand the " man init " command output on Unix. There are basically 8...
-
How to Unlock BSNL 3G data card to use it with Airtel and Vodafone Model no : LW272 ? How to unlock BSNL 3G data card( Model no : LW272 )us...
-
How to transfer bike registration from one State to other (Karnataka to Andhra)?? Most of us having two wheelers purchased and registered in...
-
ఓం శ్రీ స్వామియే శరణం ఆయ్యప్ప!! Related posts : Trip to Sabarimala - Part 1 Trip to Sabarimala - Part 2 Ayappa Deeksha required things...
-
Following are some of interesting blogs I found till now ...please comment to add your blog here. Blogs in English : http://nitawriter.word...
Popular posts
- Airtel and vodafone GPRS settings for pocket PC phones
- Andhra 2 America
- Ayyappa Deeksha required things
- Blogs I watch !
- Captions for your bike
- DB2 FAQs
- Deepavali Vs The Goddes of sleep
- ETV - Dhee D2 D3
- Evolution of smoking in India Women
- How to make credit card payments?
- init 0, init 1, init 2 ..
- Java-J2EE interview preparation
- mCheck Application jar or jad download
- My SQL FAQs
- My Travelogues
- Old is blod - New is italic
- Online pay methids for credit cards
- Oracle FAQs
- Pilgrimages
- Smoking in Indian Women
- Technology Vs Humans
- Twitter feeds for all Telugu stars on single page.
- Unix best practices
- Unix FAQs