Skip to main content

Posts

xargs in unix

Sometimes we have a list with which we may need to do the same action on it. In such cases xargs command is very useful in unix. Some scenarios: Get word count of the files in a file > ls | xargs wc -l

mutt command in UNIX

To send mail from UNIX terminal we can use mutt utility. Syntax : > echo " Some text " | mutt -a <Any attachment> -s "Subject line" -- email-address Example : > echo "Wish you happy birthday" | mutt -a "gift.jpg" -S "Happy birthday" -- techmail@techinfotalks.com

SSH in unix

To access another server/machine we use ssh to authenticate and do communication. Syntax : >ssh user@server -P password This will login to another machine from our local system. Sometime we may need to fetch the content from another file in remote system , in this case we can use the below form >ssh user@server -P password "cat /home/abc/1.txt | grep <Text to search>" If we echo the above we can see the content from our system Eg : echo $(ssh user@server -P password "cat /home/abc/1.txt | grep MMDDYYYY") This will fetch the line with the date format specified from the file.

Nokia android phones

Nokia has launched Android phones in India. The official launch is on June 13th 2017. It comes in 3 variants . Nokia 3 , 5 and 6. The price of the phone is also leaked before it's launch. Nokia 3 will cost Rs. 9990, 5 for Rs. 12990 and 6 variant costs Rs. 15990 in India. Nokia was one of the favourite brand during the first decard of 21st century. It lists it's shine with the launch of Apple iPhone and the subsequent growth smart phone industry with Android. Though it's late many are waiting for the Nokia Android phones launch.

Hadoop for beginners

I just completed by hadoop fundamentals course from Udemy.com . The videos were very well organized so that you will get the glance of what is this world of big data and how hadoop framework can play a major role is processing this big data. The course was insisting in downloading hortonworks hadoop development sandbox and working with it. Hortonworks are providing the hadoop environment setup to download and we can load it in a virtual machine. I have downloaded the virtual box sandbox file. The course gave a string insight on hadoop architecture and buzz words around it. It gave a in depth idea of hive and pig tools and how they play the key role in storing and processing data in the framework.

Python : String functions

Hi all , I will show how to use some string related function and operations on list datastructure in python String function Length of string  len(string)  - > This will bring the length of the string passed to it. Check if a character in string is upper case of lower case string[i].isupper() - > This is for checking upper case sttring[i].islower() - > this is for checking lower case Convert a character to upper case or lower case a = string[i].upper() - > This is for converting a character to upper case a = string[i].lower() - > This is for converting a character to lower case Please note here i means the index of the character in the string. Split a line of words  k = string.split(" ") Here the string is split and words a assigned to a list. The delimited used is " " List operations Initialize as list K = [] This will initialize a list Add or append a value to list k.append("a") - > This will add cha