CONCAT() Function – MySQL

MySQL Function

CONCAT() Function – MySQL MySQL has the CONCAT() function, which allows you to concatenate two or more strings. The function actually allows for one or more arguments, but its main use is to concatenate two or more strings. CONCAT (string1, string2,…) Arguments string1 First string to be joined. string2 Second string to be joined. Up … Read more

TIMEDIFF – MySQL Function

MySQL Function

TIMEDIFF – MySQL Function This returns the difference between two datetime expressions: For example: SELECT TIMEDIFF(“2020-05-10 13:10:11”, “2020-05-05 13:10:10”); Output: 120:00:01 Let’s Understand the few things about timediff function The TIMEDIFF() function returns the difference between two time/datetime expressions. time1 and time2 should be in the same format, and the calculation is time1 – time2. … Read more

My first web page – html introduction

html index

My first web page – html introduction HTML is the standard markup language to create Web page. HTML stands for Hyper Text Markup Language HTML describes the structure of a Web page HTML consists of a series of elements HTML elements tell the browser how to display the content HTML elements are represented by tags … Read more

Shell Script Example – Linux

linux

Shell Script Example – Linux for ((j=12;j<=31;j++)); do echo $j year=2020 month=01 day=$j mkdir /mnt/recording/final/11/$year-$month-$day results=($(mysql –user name -ppassword -h 192.168.2.4 db -Bse “SELECT id FROM calldetails  WHERE calldate BETWEEN ‘$year-$month-$day 00:00:00’ AND ‘$year-$month-$day 23:00:00′”)) cnt=${#results[@]} for (( i=0 ; i<cnt ; i++ )) do a=${results[$i]} echo auid=$a; cp /home/data/$year-$month-$day/$a.gsm /mnt/recording/final/11/$year-$month-$day/$a.gsm done done  

Shell Script : Nested for loop statement

linux

Shell Script : Nested for loop statement Nested for loops means loop within loop. They are useful for when you want to repeat something serveral times for several things. For example, create a shell script called nestedforloop.sh: #!/bin/bash # A shell script to print each number five times. for (( i = 1; i <= … Read more

Rename Multiple Files In Linux using mmv command

rename files in linux

Rename Multiple Files In Linux using mmv command mmv moves (or copies, appends, or links, as specified) each source file matching a from pattern to the target name specified by the to pattern. yum install mmv Let us say, you have the following files in your current directory. $ ls a1.txt a2.txt a3.txt Now you want … Read more