keecode logokeecode
64

Usage Error

Command line usage error

Application

Exit Code Information

Exit Code

64

Name

Usage Error

Category

Application

Usage Context

Invalid command line arguments

Common Usage

Bash Script

#!/bin/bash

if [ condition ]; then
  echo "Usage Error"
  exit 64
fi

Check Exit Code

./script.sh
echo $?  # Prints the exit code

# Check if exit code matches
if [ $? -eq 64 ]; then
  echo "Usage Error"
fi

Node.js/JavaScript

// Exit with code 64
process.exit(64);

// Or throw error that results in exit code
if (error) {
  console.error('Usage Error');
  process.exit(64);
}

Python

import sys

# Exit with code 64
if error:
    print("Usage Error")
    sys.exit(64)