Posts Tagged ‘command’

Removing Git Tags

Posted: 26th March 2015 by Tim in Git
Tags: , , , , , , , , , , , ,

If you’ve accidentally added a git tag, or if you want to remove old tags, these tags can be removed with the following three commands: git tag -d <my_tag> git push origin :<my_tag> git push –tags For example, if you want to remove the tag bad_tag, you would use these commands: git tag -d bad_tag […]

With Docker, you can specify the command to run inside the container on the command line. But what if you want to run multiple commands? You can’t escape the && syntax, or wrap the command in quotes, as Docker won’t recognise it. The trick here is to use sh -c ‘<command1 && command2 [&& command3 […]

If you have a JAR file and want to print the details from MANIFEST.MF, this can be done with one command in linux, using the unzip utility. For example: $ unzip -p /usr/share/java/hsqldb.jar META-INF/MANIFEST.MF Manifest-Version: 1.0 Created-By: 1.7.0_03-b147 (Oracle Corporation) Specification-Title: HSQLDB Implementation-Title: Standard runtime Class-Path: /usr/share/java/servlet-api-3.0.jar Main-Class: org.hsqldb.util.SqlTool Ant-Version: Apache Ant 1.8.2 Implementation-Vendor: buildd […]

Command Line Arguments in Bash

Posted: 14th June 2014 by Tim in Bash, Linux
Tags: , , , , ,

In Bash, arguments passed in on the command line are stored in numbered variables. For example, the first argument is $1, the second argument is $2, and so on. The total number of arguments passed to the program is stored in $# $0 contains the path to the program. This path may be an absolute […]

Command line arguments with Perl

Posted: 27th December 2013 by Tim in Perl
Tags: , , , , ,

Command line arguments in perl are stored in the $ARGV array, and the number of arguments can be deduced from the size of that array: $#ARGV + 1. One way to access this data is to access the data by index: $ARGV[0] for the first argument for example. Unlike C, the program name is not […]

The learning curve for LaTeX documents can be a steep one. This step-by-step guide covers installing and setting up the LaTeX environment, and creating and compiling your first document so that you can read and distribute it. Setting up the LaTeX environment A few things need to be installed before we can start creating documents. […]