Stop Using ./ as in ./scriptname

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

PHP include file 1 CS380. PHP Include File  Insert the content of one PHP file into another PHP file before the server executes it  Use the  include()
CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Introduction to UNIX GPS Processing and Analysis with GAMIT/GLOBK/TRACK T. Herring, R. King. M. Floyd – MIT UNAVCO, Boulder - July 8-12, 2013 Directory.
ATM 315 Environmental Statistics Course Goto Follow the link and then choose the desktop application.
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
Introduction to Shell Script Programming
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
Module 2 - The File System
UNIX/LINUX Shells Shell is an UNIX/LINUX command interpreter. Shell command can be internal or external. The code to execute an internal command is part.
Introduction to Linux OS (IV) AUBG ICoSCIS Team Prof. Volin Karagiozov March, 09 – 10, 2013 SWU, Blagoevgrad.
UNIX/LINUX SHELLS.  “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
8 th Semester, Batch 2008 Department Of Computer Science SSUET.
©Colin Jamison 2004 Shell scripting in Linux Colin Jamison.
Review of Fundamentals (cont’d) Todd Kelley CST8207 – Todd Kelley1.
ET710 HTML Paths: Dot Dot Slash Notation. Directory (folder) Hierarchy. We can think of a computer’s file structure as a tree with branches. The trunk.
Updated 2/2014 Score Room Check In Program. Updated 2/2014 The Check In Program Program is available at: – (Bottom of Web.
Executable scripts. So far We have made scripts echo hello #for example And called it hello.sh Run it as sh hello.sh This only works from current directory?
1 Day 18 Bash and the.files. 2 The.files ls shows you the files in your directory –Or at least most of them. –Some files are hidden. Try: ls –a –This.
Compunet Corporation Introduction to Unix (CA263) Your Environment By Tariq Ibn Aziz Dammam Community College.
MySQL Getting Started BCIS 3680 Enterprise Programming.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
Introduction to Bash Shell. What is Shell? The shell is a command interpreter. It is the layer between the operating system kernel and the user.
Install CB 1.8 on Ubuntu. Steps Followed Install Ubuntu (Ubuntu LTS) on Virtual machine – (VMware Workstation) (
Configuration your environment Many user-configurable Unix programs (such as your shell) read configuration files when they start up. These configuration.
Running the Operational Codes for the Brahmaputra Tom Hopson.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
PROGRAMMING USING PYTHON LANGUAGE ASSIGNMENT 1. INSTALLATION OF RASPBERRY NOOB First prepare the SD card provided in the kit by loading an Operating System.
MySQL Getting Started BCIS 3680 Enterprise Programming.
Agenda Customizing a Unix/Linux account Environment Introduction to Start-up Files (.bash_profile,.bashrc,.profile,.kshrc) Safe Methods for Changing Start-up.
Using Grsync with Ubuntu Presented by Dave Mawdsley, DACS Member, Linux SIG August 20, 2008 (making rsync easy with a memory key or a server)
Pogoplug Pro Presented by Dave Mawdsley, DACS Member, Linux SIG Member (installing and using a Pogoplug Pro)
Presented by Dave Mawdsley, DACS Linux Workshop Leader/Member
Notes on Backups Presented by Dave Mawdsley, DACS Member, Linux SIG Member a look at priorities and simple backup methods.
A Simple SED Lesson Presented by Dave Mawdsley, DACS Member, Linux SIG Member February 15, 2012 (modifying HTML tags in an html file)
Using Bash and Perl in Ubuntu to get Stock Quotes Presented by Dave Mawdsley, DACS Member, Linux SIG November 16, 2011 (a quick way to see the latest prices.
Presented by Dave Mawdsley, DACS Member, Linux SIG Member
Presented by Dave Mawdsley, DACS Member, Linux SIG February 20, 2013
Using Crontab with Ubuntu
Presented by Dave Mawdsley, DACS Linux Workshop Leader/Member
Presented by Dave Mawdsley, DACS Member, Linux SIG Member
LINUX FOR BEGINNERS Because everyone needs Fundamentals
Recording Live Audio from the Internet Using Audacity
Using pktstat with Bash
>> PHP: HTML Integration
By Jonathan Rinfret CREATING A BASH SCRIPT By Jonathan Rinfret
Discussion about 'Shellshock' fixes--Ubuntu and OS X
Getting SSH to Work Between Computers
A First Look at Layers in GIMP
Using Clam Anti-Virus with Ubuntu
Managing results files
Vulnerability Scanning With 'lynis'
Phishing...or What to Call It?
A First Look at Levels in GIMP
LINUX FOR BEGINNERS Because everyone needs Fundamentals
Introduction to computing
WELCOME FREESURFER COURSE ATTENDEES!
John Carelli, Instructor Kutztown University
The Linux Command Line Chapter 24
Young Joon Kim SPL basic – Quick Start SPL First Beginner Course – 01 Young Joon Kim
Linux Shell Script Programming
How to transfer your sandbox Canvas shell to the real Canvas
Module 4 Command Line Skills
Chapter 3 The UNIX Shells
The Linux Command Line Chapter 24
Presentation transcript:

Stop Using ./ as in ./scriptname (a quick addition to $PATH) Presented by Dave Mawdsley, DACS Member, Linux SIG Member March 21, 2012

[ http://technonstop.com/dot-slash-meaning-linux ] 1 Introduction This presentation is based on “The Meaning of dot slash for Running an Executable in Linux” by Abdullah Chougle at TechNonStop. [ http://technonstop.com/dot-slash-meaning-linux ] ./ decoded means . is the current directory and / is the directory path separator. When typing ./scriptname at the shell, you access and execute scriptname in the current directory.

My Old Script Execute Method 2 My Old Script Execute Method In the shell I would type ./d to access my main menu system.

Append the $PATH Variable 3 Append the $PATH Variable Here's what Abdullah suggested: Append the current directory to the PATH variable to include the . as follows: export PATH=$PATH:. So here is my new $PATH variable: (Note the dot at the end.) echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:.

My New Script Execute Method 4 My New Script Execute Method So now all I have to do to access my directory is to type just the d in my home folder where the d script resides. madmod@madmod-laptop:~$ d and my directory page comes up as before.

Stop Using ./ as in ./scriptname (a quick addition to $PATH) This OpenOffice.org Presentation 'pathfix.odp' can be downloaded from http://madmod.com/freebies.html