How to Remove ^M in Linux & Unix

Control M ( ^M)  characters are introduced when you use  lines of text from a windows computer to  Linux or Unix machine.  Most common reasons are when you directly copy a file from a windows system or submit form data copied and pasted from a windows machine.

Detecting ^M characters

^M is non printable character and often becomes difficult to find, in order to see if your file contains any non printable character use the cat command with -v option

$cat -v filename

Methods to remove ^M

In all these method , real secret is not to type ^M using keyboard but rather typing in control key sequence to get the ^M control character.

Bash Positional Parameters

Shell has several special positional parameters which can be referenced but can not be assigned. These are used to process command line arguments in a shell script, to get process status, exit status and options flag.

These positional parameters can be assigned to a variable and values can be used for further processing.

 $0 , $1 $2 $3 … parameters

These are special parameters and and has specific meaning according to the number.  These parameters are useful if you want to validate executing file name and do the processing based on the arguments.

$0 : Shell argument 0, It expands into bash script file name or bash shell.

$1 $2 $3 …   : Shell argument number : Used to get the specific argument from the script.

for example let’s create & execute the test script with some parameters :

‘Amazon go’ – No Checkout Store Opens in Seattle

Amazon Go is a new kind of store with no checkout required,amazon go store

Use app to enter the store, and after that you don’t need it to shop. Browse and shop like you would at any other store and once you’re done you can simply walk out without having to stand in a checkout line.

Amazon Go store opening on Monday in Seattle is about 1,800 square feet store, located at 2131 7th Ave, Seattle, WA, opening from 7AM—9PM open Monday through Friday. The store will offer ready-to-eat breakfast, lunch, dinner, and snack options made by chefs and favorite local kitchens and bakeries. Grocery essentials ranges from bread and milk to artisan cheeses and locally made chocolates. There are Amazon Meal Kits to get the meal ready in 30 minutes!

Although there is no human involvement in checkout a lot of technology in use at the backend, the same types of technologies used in self-driving cars like computer vision, sensor fusion, and deep learning.

Here is a video to explain shopping experience at amazon go store.

DNS Sinkhole Setup : Your defense against Bot net controllers

According to statistics published in csoonline.com cyber crimes damages will hit 6 trillion by 2021 and 6 billion people target ( 75% of projected 8 billion population).  As the access to network is increasing,  hacking and committing cyber crime has become as easy as sending an email with malware link and its clicking by unsuspecting victims.

A botnet consists of a  number of  compromised hosts  controlled by botnet controller managed by third parties .  Bot net constitutes a major security threat and used to deploy malware, steal sensitive data, orchestrate DDoS attack.  Once systems inside a network are compromised by installing malware it becomes very difficult to detect as the theft of data and sources of DDoS is orchestrated from within the network.

DNS sink hole is a process to identify the bot net master hosting malware software servers and assign the dns record of these hosts to localhost, non-existing or unused ip address . A  valid ip is not returned for these host resolution and the infected host never connects to the bot net master server.

In order to understand how DNS Sink hole work we need to understand the bot net structure and its organization.

 How a bot network is organized and activated ?

The initial part involves getting access to inside corporate network.  This can be achieved in many ways like using brute force method to crack the passwords and encrypted data and other approach is rather simple, involving sending a link in email and betting on the chances that some users will click the link and deploy malware on their computers.

Global Enterprise Mobility Trends

The landscape of enterprise mobility has seen numerous exciting developments that continue to shape the industry towards sustainable growth on a global scale. More and more organizations are viewing enterprise mobility as a priority rather than a mere project. In fact, recent statistics indicate that 71% of enterprise across the world regard mobility as a top priority and the market is anticipated to reach a valuation of US$510.39 billion by the end of 2022.