Linux

Facebook Twitter

Linux System Administrator's Guide. Bash String Manipulation Examples – Length, Substring, Find and Replace. In bash shell, when you use a dollar sign followed by a variable name, shell expands the variable with its value.

Bash String Manipulation Examples – Length, Substring, Find and Replace

This feature of shell is called parameter expansion. But parameter expansion has numerous other forms which allow you to expand a parameter and modify the value or substitute other values in the expansion process. In this article, let us review how to use the parameter expansion concept for string manipulation operations. This article is part of the on-going bash tutorial series. Refer to our earlier article on bash { } expansion. 1. ${#string} The above format is used to get the length of the given bash variable. $ cat len.sh #!

To understand more about bash variables, read 6 Practical Bash Global and Local Variable Examples. Unix and Linux. Man page. Explainshell.com - match command-line arguments to their help text. ShellCheck – Online shell script analyzer. Manage, share and source your aliases online. LinuxCommand.org: Learn the Linux command line. Write shell scripts. Examplenow - Linux, UNIX command line examples. Useful Unix commands for data science. Imagine you have a 4.2GB CSV file.

Useful Unix commands for data science

It has over 12 million records and 50 columns. All you need from this file is the sum of all values in one particular column. How would you do it? Writing a script in python/ruby/perl/whatever would probably take a few minutes and then even more time for the script to actually complete. A database and SQL would be fairly quick, but then you'd have load the data, which is kind of a pain. Thankfully, the Unix utilities exist and they're awesome. Let's assume our data, which we'll call data.csv, is pipe-delimited ( | ), and we want to sum the fourth column of the file. cat data.csv | awk -F "|" '{ sum += $4 } END { printf "%.2f\n", sum }' The above line says: It took less than two minutes to run on the entire file - much faster than other options and written in a lot fewer characters. For those who are a bit newer to the command line than the rest of this post assumes, Hilary previously wrote a nice introduction to it.

Other commands grep sed Additional Resources: Unix. Linux. Cron. LINUX. LINUX. Ubuntu. Genaral commands Unix. Distrowatch. Arch. Manjaro official. LINUX. Coursera.org. Web Search Results.

Ubuntu

Uninstall Survey. Recently I was developing at home, where I do not have Visual Assist; it was so much slower.

Uninstall Survey

It was like programming with stone knives and bearskins. Visual Assist has been so good I don't notice it anymore – until I use an IDE without it. Then, I wonder what's wrong with the IDE. David Smith Tyco Electronics We rely heavily on Visual Assist in my office. Rasmus Anthin Surgical Science Inc Visual Assist has proven to always increase productivity. Kristoffer Danielsson Kaysoft Been using Visual Assist for quite a few years now and it's just gotten better and still better! John West Microsoft, PTLS Test Tech. I've become addicted to Visual Assist at work.

Your product and support are top of the line. Kristen Overmyer Halifax Biomedical Inc. Just really, really thank you. Adrian Edmonds CMosaix Ltd. Every time I hear a developer complain about C++ support in VS, I point them to you guys. Chris Tartamella Bentley Systems, Inc. Your product is just awesome and I can't code without it. Linux-Unix Cheat Sheets - The Ultimate Collection.

HowtoForge - Linux Howtos and Tutorials. XenoCafe - Learn Linux the easy way with our free comprehensive tutorials for beginners. Linux Commands - A practical reference. The Incredible Guide to NEW Ubuntu (Karmic Koala) [PDF] With the recent release of a new Ubuntu, Karmic Koala, we felt it was time to go back to the roots and beyond.

The Incredible Guide to NEW Ubuntu (Karmic Koala) [PDF]

Enter the Ubuntu Karmic Koala Bible – a guide that’s both great for Linux initiates as well as for Linux intermediates. With 50+ easy to follow tutorials, this guide belongs in the virtual library of every Linux user! The guide is aimed, not only familiarizing you, but on making your Linux experience easier in general. Learn how to define command aliases, making the Command Line Shell easy to use! Beginner's Guide to Nmap. Ever wondered how attackers know what ports are open on a system?

Beginner's Guide to Nmap

Or how to find out what services a computer is running without just asking the site admin? You can do all this and more with a handy little tool called Nmap. What is Nmap? Short for "network mapper," nmap is a veritable toolshed of functionality to perform network scans. It can be used for security scans, simply to identify what services a host is running, to "fingerprint" the operating system and applications on a host, the type of firewall a host is using, or to do a quick inventory of a local network.