Command Line Reference

Similar documents
Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl

Top 72 Perl Interview Questions and Answers

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, Introduction 1. 2 Invoking Shell Scripts 2

Microsoft Windows PowerShell v2 For Administrators

32-Bit Workload Automation 5 for Windows on 64-Bit Windows Systems

Documentum Developer Program

List of FTP commands for the Microsoft command-line FTP client

CAPIX Job Scheduler User Guide

How to Write a Simple Makefile

Code Estimation Tools Directions for a Services Engagement

Setting Up the Site Licenses

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

Basics of I/O Streams and File I/O

Managing Code Development Using CCS Project Manager

Lecture 9. Semantic Analysis Scoping and Symbol Table

DS-5 ARM. Using the Debugger. Version 5.7. Copyright 2010, 2011 ARM. All rights reserved. ARM DUI 0446G (ID092311)


1 Introduction. 2 An Interpreter. 2.1 Handling Source Code

For Introduction to Java Programming, 5E By Y. Daniel Liang

Training Simulator and Demo Software

Using Logon Agent for Transparent User Identification

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

How to test and debug an ASP.NET application

DS-5 ARM. Using the Debugger. Version Copyright ARM. All rights reserved. ARM DUI 0446M (ID120712)

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

RTOS Debugger for ecos

Symbol Tables. Introduction

Programming Languages CIS 443

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Learn Perl by Example - Perl Handbook for Beginners - Basics of Perl Scripting Language

C HAPTER E IGHTEEN T HE PGP, MAIL, AND CGI LIBRARIES. PGP Interface Library

Setting up PostgreSQL

Database Programming with PL/SQL: Learning Objectives

Using the Synchronization Client

DS-5 ARM. Using the Debugger. Version Copyright ARM. All rights reserved. ARM DUI0446P

EPIC - User s Guide i. EPIC - User s Guide

Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports Server 6i

PHP Debugging. Draft: March 19, Christopher Vickery

Siebel Application Deployment Manager Guide. Siebel Innovation Pack 2013 Version 8.1/8.2 September 2013

OLH: Oracle Loader for Hadoop OSCH: Oracle SQL Connector for Hadoop Distributed File System (HDFS)

Ckpdb and Rollforwarddb commands

ROM Monitor. Entering the ROM Monitor APPENDIX

id_prob_result_coredump_aix.ppt Page 1 of 15

CS Unix Tools & Scripting Lecture 9 Shell Scripting

Job Scheduler Daemon Configuration Guide

Bitrix Site Manager 4.0. Quick Start Guide to Newsletters and Subscriptions

Lecture 4: Writing shell scripts

7 Why Use Perl for CGI?

When choosing where to install and run the log analyzer, be aware that it requires access to the following log files:

OpenGeo Suite for Linux Release 3.0

03 - Lexical Analysis

Application Note C++ Debugging

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

WS_FTP Professional 12

Network Detective Client Connector

Data Tool Platform SQL Development Tools

#!/usr/bin/perl use strict; use warnings; use Carp; use Data::Dumper; use Tie::IxHash; use Gschem 3; 3. Setup and initialize the global variables.

Glossary of Object Oriented Terms

Mimer SQL. Programmer s Manual. Version 8.2 Copyright 2000 Mimer Information Technology AB

Release Bulletin EDI Products 5.2.1

Command Line Interface User Guide for Intel Server Management Software

Eventia Log Parsing Editor 1.0 Administration Guide

Installing and using XAMPP with NetBeans PHP

Controlling LifeSize Video Systems from the CLI

7. Data Packager: Sharing and Merging Data

TIBCO BusinessEvents Business Process Orchestration Release Notes

Bundler v0.5 Documentation

Offline Image Viewer Guide

Introduction to Java and Eclipse

C#5.0 IN A NUTSHELL. Joseph O'REILLY. Albahari and Ben Albahari. Fifth Edition. Tokyo. Sebastopol. Beijing. Cambridge. Koln.

TELNET CLIENT 5.11 SSH SUPPORT

The ASCII Character Set

UNIX, Shell Scripting and Perl Introduction

Debugging Java Applications

Computer Programming C++ Classes and Objects 15 th Lecture

WissGrid. JHOVE2 over the Grid 1. Dokumentation. Arbeitspaket 3: Langzeitarchivierung von Forschungsdaten. Ă„nderungen

Troubleshooting. System History Log. System History Log Overview CHAPTER

Introduction to Perl

The programming language C. sws1 1

Outline. Unix shells Bourne-again Shell (bash) Interacting with bash Basic scripting References

Monitoring, Tracing, Debugging (Under Construction)

HYPERION DATA RELATIONSHIP MANAGEMENT RELEASE BATCH CLIENT USER S GUIDE

Version Control. Luka Milovanov

Managed File Transfer with Universal File Mover

Elixir Schedule Designer User Manual

Incremental Backup Script. Jason Healy, Director of Networks and Systems

: provid.ir

Best Practices Guide for NerveCenter System and Security Administrators. Windows and UNIX Version 5.x Version 6.x. July 2011 NCBPSA

PharmaSUG Paper CC18

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

Perl version documentation - Digest::SHA NAME SYNOPSIS SYNOPSIS (HMAC-SHA) Page 1

Audit Trail Administration

Using Stat/Transfer on the Linux/UNIX Systems

Dynamic Web Pages for EnviroMon

APACHE WEB SERVER. Andri Mirzal, PhD N

1001ICT Introduction To Programming Lecture Notes

CSE 141L Computer Architecture Lab Fall Lecture 2

Forensic Analysis of Internet Explorer Activity Files

Transcription:

Command Line Reference The following is a list of the available switches which can be appended to the calling of perl from the command line. The exact syntax for calling perl from the command line is as follows: C:\Perl\bin\Perl.exe (switches) (--) (programfile) (arguments) -0(octal) This sets the record separator ($/) by specifying the character's number in the ASCII table in octal. For example, if we wanted to set our separator to the character 'e' we would say perl -0101. The default is the null character, and $/ is set to this if no argument is given. See Appendix F for a complete ASCII table. -a -a can be used in conjunction with -n or -p. It enables autosplit, and uses whitespace as the default delimiter. Using -p will print out the results, which are always stored in the array @F. -C Enables native wide character system interfaces -c This is a syntactic test only. It stops Perl executing, but reports on any compilation errors that a program has before it exits. Any other switches that have a runtime effect on your program will be ignored will -c is enabled. -d filename This switch invokes the Perl debugger. The Perl debugger will only run once you have gotten your program to compile. Enabling -d allows you to prompt debugging commands such as install breakpoints, and many others. Table continued on following page

Appendix E -D(number) -D(list) -D will set debugging flags, but only if you have debugging compiled into your program. The following table shows you the arguments that you may use for -D, and the resulting meaning of the switch. Argument (number) Argument (character) Operation 1 p Tokenizing and parsing 2 s Stack snapshots 4 l Label stack Processing 8 t Trace execution 16 o Object method lookup 32 c String/numeric conversions 580

Command Line Reference -D(list) (cont.) 64 p Print preprocessor command for -p 128 m Memory allocation 256 f Format processing 512 r Regular expression processing 1024 x Syntax tree dump 2048 u Tainting checks 4096 l Memory leaks 8192 h Hash dump Table continued on following page 581

Appendix E -D(list) (cont.) 16384 X Scratchpad allocations 32768 D Cleaning up -e This allows you to write one line of script by instructing Perl to execute text following the switch on the command line without loading and running a program file. Multiple calls may be made to -e in order to build up scripts of more than one line. -F/pattern/ Causes -a to split using the pattern specified between the delimiters. The delimiters may be / /, " ", or ' '. -h Prints out a list of all the command line switches. -i(extension) Modifies the <> operator. Makes a backup file if an argument is given. The argument is treated as the extension the saved file is to be given. -I (directory) Causes a directory to be added to the search path when looking for files to include. This path will be searched before the default paths, one of which is the current directory, the other is generally /usr/local/lib/perl on Unix and C:\perl\bin on Windows. -l(octal) -(mm)(-)module -l adds line endings, and defines the line terminator by specifying the character's number in the ASCII table in octal. If it is used with -n or - p, it will chomp the line terminator. If the argument is omitted, then $\ is given the current value of $/. The default value of the special variable $/ is newline. Causes the import of the given module for use by your script, before executing the program. -n Causes Perl to assume a while (<>) {My Script} loop around your script. Basically it will iterate over the filename arguments. It does no printing of lines. -p This is the same as -n, except it will print lines. -P -P causes your program to be run through the C preprocessor before it is compiled. Bear in mind that the preprocessor directives begin with #, the same as comments, so rather use ;# to comment your script when you use the -P switch. 582

Command Line Reference -s This defines variables with the same name as the switches that follow on the command line. The other switches are also removed from @ARGV. The newly defined variables are set to 1 by default. Some parsing of the other switches is also enabled. -S Causes perl to look for a given program file using the PATH environment variable. In other words, it acts much like #! -T Stops data entering a program from performing unsafe operations. It's a good idea to use this when there is a lot of information exchange occuring, like in CGI programming. -u This will perform a core dump after compiling the program. -U This forces Perl to allow unsafe operations. -v Prints the version of Perl that is currently being used (includes VERY IMPORTANT perl info). -V(:variable) Prints out a summary of the main configuration values used by Perl during compiling. It will also print out the value of the @INC array. -w Invokes the rasiing of many useful warnings based on the (poor or bad) syntax of the program being run. -W Enables all warnings. This switch has been deprecated in perl 5.6, in favor of the use warnings pragma. -x(directory) Tells Perl to get rid of extraneous text that precedes the shebang line. All switches on the shebang line will still be enabled. -X This will disable all warnings. We already know that we always use use warnings when writing our programs. So you won't need this. 583

This work is licensed under the Creative Commons Attribution-NoDerivs-NonCommercial License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd-nc/1.0 or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. The key terms of this license are: Attribution: The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit. No Derivative Works: The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it. Noncommercial: The licensor permits others to copy, distribute, display, and perform the work. In return, licensees may not use the work for commercial purposes -- unless they get the licensor's permission.