Command Line Basics After part one of the git for designers post, Kim Røen suggested in the comments doing a post with some instructions on using the command line. This is that post. We’re going to be focusing on the Mac side of things, but a lot of the concepts in here will apply to all command line programs as well. Maverick - From Also see info about the most recent LTS version, Precise Pangolin (12.04 LTS). Introduction
Useful Unix commands for data science Imagine you have a 4.2GB CSV file. 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. Bash custom shell command Super short post on creating your own custom shell command using Bash. You could do something very advanced using a general purpose or system level programming language such as Go, but most of the time a simple shell script will suffice. The downside of using a shell script is that you have to to either source it source ~/foo.sh or execute it direcly bash ~/foo.sh. The best way to work around this is to do the following: Specify a binaryWrite your script (inc. reference to any special variables)Name your script to reflect the name of the command you want to useMove the script into a location that your $PATH can accessSet the script to be executable
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. 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.
Basic Unix Commands Custom commands available on departmental Linux computers but not on Linux systems elsewhere have descriptions marked by an *asterisk. Notice that for some standard Unix/Linux commands, friendlier versions have been implemented; on departmental Linux computers the names of such custom commands end with a period. TAB Command completion !!! USEFUL !!! A Command Line Crash Course Let's face it -- the command line is a bit intimidating. It's that text-only interface that Hollywood has told us hackers furiously type away on while doing their devious business and the domain of experienced programmers who can effectively communicate in binary. It's time to get over those misconceptions. The command line (Terminal on a Mac, Command Prompt on Windows) is your window into your computer and your home base for doing development work.
How to Learn bash shell and scripting – The best tutorials for bash beginners Bash (Bourne-Again SHell) is a Linux and Unix-like system shell or command language interpreter. It is a default shell on many operating systems including Linux and Apple OS X. If you have always used a graphic user interface like KDE or Gnome or MS-Windows or Apple OS X, you are likely to find bash shell confusing. Cheat Sheet: Crontab by Example Today's article may be pretty basic for regular readers but hopefully some may find it useful. This article will cover creating a crontab entry and show some examples of common crontabs. The Cron daemon is a service that runs on all main distributions of Unix and Linux and specifically designed to execute commands at a given time. These jobs commonly refereed to as cronjobs are one of the essential tools in a Systems Administrators tool box.