UNIX Shell Script – Shell Commands Placed in a File for Later Execution

Total Page:16

File Type:pdf, Size:1020Kb

UNIX Shell Script – Shell Commands Placed in a File for Later Execution UNIX Shell script – shell commands placed in a file for later execution Files Devices Text Files Program Files Binary Files I/O device independent input indirection < output indirection > cat Interprocess Communication pipe -- used to transmit data from one file to another filter – used to select data items from the output of one pipe‟s data flow for retransmission through another pipe Erase Keys Aborting Program Execution Key Backspace Delete Ctrl-H Ctrl-C # Printing Line Deletion Keys lp <dest> check Ctrl-U lpr <dest> check @ Password Word Deletion Key passwd Ctrl-W Logging Out New Command Line Ctrl-D Ctrl-R redraws command line with exit current logout command (eliminates garbage on old line) Vi Editor vi <file name> o if no file name is provided upon entry, vi will request a name at the termination of the editor o upon opening a file, vi is in Command Mode o Escape “beep” Command Mode Insert Mode :set showmode mode display on o i insert text before cursor : set nu line numbers on o I insert text at beginning of current line :set nonu line numbers off o a append text after cursor o A append text to end of current line o open and put text in a new line below current line o open and put text in a new line above current line Insert Mode Command Mode o Escape Command Mode Line Mode o : Command Mode Editing o r replace single character under cursor o R replace multiple characters, starting at the current cursor position, <Esc> to exit o cw change the current word with new text, starting with the character under the cursor, <Esc> to exit o cNw change N words beginning with character under cursor, <Esc> to exit e.g., c5w changes 5 words o C change (replace) the characters in the current line, <Esc> to exit o cc change (replace) the entire current line, <Esc> to exit o Ncc or cNc change (replace) the next N lines, starting with the current line, <Esc> to exit e.g., 5cc &/or c5c changes the next 5 lines including the current line o x delete the single character under the cursor o Nx delete N characters, starting with character under cursor, e.g., 5x deletes 5 characters o dw delete the single word beginning with character under cursor o dNw delete N words beginning with character under cursor; e.g., d5w deletes 5 words o D delete the remainder of the line, starting with current cursor position o dd delete entire current line o Ndd or dNd delete N lines, beginning with the current line; e.g., 5dd deletes 5 lines o yy copy (yank, cut) the current line into the buffer o Nyy or yNy copy (yank, cut) the next N lines, including the current line, into the buffer o p put (paste) the line(s) in the buffer into the text after the current line o P put (paste) the line(s) in the buffer into the text before the current line o u undo last action (toggle switch) o U undo all changes made to the current line o . repeat last text change at current position File Recovery vi –r <file name> retrieve crashed file Saving Files o :w<Return> write current contents to file named in original vi call o :w newfile<Return> write current contents to a new file named newfile o :w! oldfile<Return> write current contents over a pre-existing file, oldfile Exiting Vi o :x<Return> quit vi, writing out modified file to file named in original invocation o :wq<Return> quit vi, writing out modified file to file named in original invocation o :q<Return> quit (or exit) vi prompting for file name o :q!<Return> quit vi even though latest changes have not been saved for this vi call Command Mode Cursor Moving o j or <Return> or [down-arrow] move the cursor down one line o k or [up-arrow] move cursor up one line o h or <Backspace> or [left-arrow] move the cursor left one character o l or <Space> or [right-arrow] move the cursor right one character o 0, i.e., zero, move the cursor to start of current line o $ move the cursor to end of current line o w move the cursor to beginning of next word o b move the cursor back to beginning of preceding word o :0<Return> or 1G move the cursor to the first line in the file o :n<Return> or nG move cursor to line n, e.g., 5<Return> or 5G moves the curser to line 5 o :$<Return> or G move cursor to last line in file o ctrl-f scrolls down one screen o ctrl-b scrolls up one screen o ctrl-u scrolls up a half a screen o ctrl-d scrolls down a half a screen Command Mode Screen Manipulation o Ctrl-f move forward one screen o Ctrl-b move backward one screen o Ctrl-d move down (forward) one half screen o Ctrl-u move up (back) one half screen o Ctrl-l redraws the screen o Ctrl-r redraws the screen, removing deleted lines Line Numbers o :.= returns line number of current line at bottom of screen o := returns the total number of lines at bottom of screen o Ctrl-g provides the current line number, along with the total number of lines, in the file at the bottom of the screen o :set number sets line numbers o :set nonumber eliminates line numbers Unix Commands cat entire screen delivered to target, e.g., screen more <sp> next page no EOF display; direct return to shell pg <return> next page EOF display K shell who or w displays list of users currently on the system talk or write mailx check – may be obsolete finger displays list of all users of the system mesg returns your current message status mesg n blocks messages to your terminal mesg y allows messages to pop up on your screen at will man displays manual WARNING – may not be useful man –k displays list of keywords date head <file name> displays first ten lines of file head –n <file name> displays first n lines of file sed –n <file name> displays first n lines of file grep „search-string‟ <file-name> searches <file-name> for occurrences of any string containing „search-string‟ as a subsring tail <file name> displays last ten lines of file tail –n <file name> displays last n lines of file sort <file-name> sorts the contents of <file-name> line-by-line uniq <file-name> displays <file-name> skipping adjacent duplicate lines sort <file-name> | uniq > newfile produces a file named newfile that contains no duplicate lines whereis <tool name> not SVR4 path to <tool name>, location in man provides listing of multiple occurrences of <tool name> which <tool name> not SVR4 returns <tool name> in the current path Special Characters (Shell Usage Only) & ; | * ? „ “ ` [ ] ( ) $ < > { } ^ # / | % ! ~ Quoting Special Characters \”Hello\” treated as “Hello” \cntrl-h treated as cntrl-h \cntrl-u treated as cntrl-u “**” Coffee treated as ** Coffee File Structure Directories Root directory / Home directory . Relative pathnames working directory Parent directory .. Absolute pathnames root directory Working directory pwd path to working directory rm cd return to your home directory rmdir ls mkdir ls -l mv <file> <dir> ls –a mv <file1> <file2> cp source-file destination-file Standard Directories / root – ancestor of all files in he filesystem /home one of several subdirectories of root that may contain users home directories /usr contains subdirectories that contain system information /usr/bin contains the standard Unix programs /bin same as usr/bin /usr/sbin system administration utilities /usr/ucb contains BSD utilities /usr/bsd contains BSD utilities /sbin system administration utilities /etc configuration & other system files /etc/passwd classical directory for password files <not currently used> /var subdirectories contain files whose contents vary as system runs temporary files, system logs, spooled files, etc. /dev contains peripheral device files /tmp contains temporary files Access Permissions file-types o - file o d directory o l hard link -rwx r- - r- - 1 cputnam c322 6753 May 5 12:06 syllabus o s symbolic link drwx - - - - - - cputnam 413 May 5 12:15 grades permissions owner group universe r w x r w x r w x link-count owner-name group-name univ-name file-size creation/modification date & time file-name chmod 777 syllabus changes permissions to rwx for group and universe, i.e., 111 111 111 binary 7 7 7 hexadecimal chmod 744 syllabus changes permissions to r - - for group and universe, i.e., 111 100 100 binary 7 4 4 hexadecimal Links home alex jenny File a1 File a2 File j1 working directory alex alex is creating a link to jenny ln a2 /home/jenny/a2 creates link remove link by removing the file Shells Entering Command Line Get Next Character yes cntrl-h ForgeForgett Previous Character in Buffer no yes cntrl-u Forget Entire Buffer no no Store Character return in Buffer yes Pass buffer to shell for processing Processing the Command line Get FirstFirst Word; Save as CommandCommand Name no Get Next Word; NEWLINE Save as Argument yes Execute Program Program Exists? no yes IssueIssue PromptPrompt Terminal File device file -- /dev directory terminal file name – who listing – name following login name who am i cputnam ttyp19 May 5 19:31:16 writing to terminal displays on monitor reading from terminal reads input from keyboard login shell directs standard output to the device file monitor standard input to the device file keyboard cat file1 – executed with the argument file1 writes file1 to the standard output cat – executed without arguments reads from the standard input writes to the standard output until cntrl-d is entered EOF signal sent to cat redirection standard input cat file1 < file0 standard output cat file1 > file2 cat file1 file2 file3 > file4 copies the contents of files 1, 2 & 3 to file4; the original contents of file4 are destroyed appending cat file1 >> file0 appends contents of file1 to the tail of file0 pipes connect stdout of first command to srdin of second command can be used on any command that accepts input from the command line or from stdin o cat file1 | tr .
Recommended publications
  • Boot Mode Considerations: BIOS Vs UEFI
    Boot Mode Considerations: BIOS vs. UEFI An overview of differences between UEFI Boot Mode and traditional BIOS Boot Mode Dell Engineering June 2018 Revisions Date Description October 2017 Initial release June 2018 Added DHCP Server PXE configuration details. The information in this publication is provided “as is.” Dell Inc. makes no representations or warranties of any kind with respect to the information in this publication, and specifically disclaims implied warranties of merchantability or fitness for a particular purpose. Use, copying, and distribution of any software described in this publication requires an applicable software license. Copyright © 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be the property of their respective owners. Published in the USA [1/15/2020] [Deployment and Configuration Guide] [Document ID] Dell believes the information in this document is accurate as of its publication date. The information is subject to change without notice. 2 : BIOS vs. UEFI | Doc ID 20444677 | June 2018 Table of contents Revisions............................................................................................................................................................................. 2 Executive Summary ............................................................................................................................................................ 4 1 Introduction ..................................................................................................................................................................
    [Show full text]
  • The Linux Kernel Module Programming Guide
    The Linux Kernel Module Programming Guide Peter Jay Salzman Michael Burian Ori Pomerantz Copyright © 2001 Peter Jay Salzman 2007−05−18 ver 2.6.4 The Linux Kernel Module Programming Guide is a free book; you may reproduce and/or modify it under the terms of the Open Software License, version 1.1. You can obtain a copy of this license at http://opensource.org/licenses/osl.php. This book is distributed in the hope it will be useful, but without any warranty, without even the implied warranty of merchantability or fitness for a particular purpose. The author encourages wide distribution of this book for personal or commercial use, provided the above copyright notice remains intact and the method adheres to the provisions of the Open Software License. In summary, you may copy and distribute this book free of charge or for a profit. No explicit permission is required from the author for reproduction of this book in any medium, physical or electronic. Derivative works and translations of this document must be placed under the Open Software License, and the original copyright notice must remain intact. If you have contributed new material to this book, you must make the material and source code available for your revisions. Please make revisions and updates available directly to the document maintainer, Peter Jay Salzman <[email protected]>. This will allow for the merging of updates and provide consistent revisions to the Linux community. If you publish or distribute this book commercially, donations, royalties, and/or printed copies are greatly appreciated by the author and the Linux Documentation Project (LDP).
    [Show full text]
  • Introduction to Linux – Part 1
    Introduction to Linux – Part 1 Brett Milash and Wim Cardoen Center for High Performance Computing May 22, 2018 ssh Login or Interactive Node kingspeak.chpc.utah.edu Batch queue system … kp001 kp002 …. kpxxx FastX ● https://www.chpc.utah.edu/documentation/software/fastx2.php ● Remote graphical sessions in much more efficient and effective way than simple X forwarding ● Persistence - can be disconnected from without closing the session, allowing users to resume their sessions from other devices. ● Licensed by CHPC ● Desktop clients exist for windows, mac, and linux ● Web based client option ● Server installed on all CHPC interactive nodes and the frisco nodes. Windows – alternatives to FastX ● Need ssh client - PuTTY ● http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html - XShell ● http://www.netsarang.com/download/down_xsh.html ● For X applications also need X-forwarding tool - Xming (use Mesa version as needed for some apps) ● http://www.straightrunning.com/XmingNotes/ - Make sure X forwarding enabled in your ssh client Linux or Mac Desktop ● Just need to open up a terminal or console ● When running applications with graphical interfaces, use ssh –Y or ssh –X Getting Started - Login ● Download and install FastX if you like (required on windows unless you already have PuTTY or Xshell installed) ● If you have a CHPC account: - ssh [email protected] ● If not get a username and password: - ssh [email protected] Shell Basics q A Shell is a program that is the interface between you and the operating system
    [Show full text]
  • Writing Your First Linux Kernel Module
    Writing your first Linux kernel module Praktikum Kernel Programming University of Hamburg Scientific Computing Winter semester 2014/2015 Outline ● Before you start ● Hello world module ● Compile, load and unload ● User space VS. kernel space programing ● Summary Before you start ● Define your module’s goal ● Define your module behaviour ● Know your hardware specifications ○ If you are building a device driver you should have the manual ● Documentation ○ /usr/src/linux/Documentation ○ make { htmldocs | psdocs | pdfdocks | rtfdocks } ○ /usr/src/linux/Documentation/DocBook Role of the device driver ● Software layer between application and device “black boxes” ○ Offer abstraction ■ Make hardware available to users ○ Hide complexity ■ User does not need to know their implementation ● Provide mechanism not policy ○ Mechanism ■ Providing the flexibility and the ability the device supports ○ Policy ■ Controlling how these capabilities are being used Role of the device driver ● Policy-free characteristics ○ Synchronous and asynchronous operations ○ Exploit the full capabilities of the hardware ○ Often a client library is provided as well ■ Provides capabilities that do not need to be implemented inside the module Outline ● Before you start ● Hello world module ● Compile, load and unload ● User space VS. kernel space programing ● Summary Hello world module /* header files */ #include <linux/module.h> #include <linux/init.h> /* the initialization function */ /* the shutdown function */ static int __init hello_init(void) { static void __exit hello_exit(void)
    [Show full text]
  • UNIX Shell Programming (15CS35) Solution Internal Assessment
    UNIX Shell Programming (15CS35) Solution Internal Assessment- II November - 2016 1. Explain significance of following commands (2x5=10 M) i. cp ?????? progs Wild card ? matches any single character, hence the above command (cp) copies files whose names are six in length to progs directory ii. ls *.[xyz]* Wild card * matches any number of characters, hence the above command (ls) lists all the files having extension as either x, or y or z. iii. ls jones[0-9][0- 9][0-9] In the above command the character class[0-9] matches any digit between 0 to 9. Hence the above command lists all the files beginning with jones and having last three characters as any digit between 0 to 9. iv. echo * The above command lists all the file in the current directory. v. cp foo foo* The above command copies the file foo to file called foo*. Here the wild card * loses its meaning. 1. Write UNIX commands for the following (2 X 5= 10 M) i. Find and replace all the occurrences of unix with UNIX in the file after confirming the user. : 1,$s/unix/UNIX/gc ii. List all the files in the current directory which names are having exactly 5 characters and any number of characters in their extension. ls ?????.* iii. Copy all files stored in /home/vtu with .c, .cpp and .java extensions to progs sub- directory in current directory cp /home/vtu/*.{c,cpp,java} ./progs iv. Delete all files containing agra or agar in their file names. rm *ag[ra][ar]* v.
    [Show full text]
  • Name Synopsis Description
    Perl version 5.10.0 documentation - vmsish NAME vmsish - Perl pragma to control VMS-specific language features SYNOPSIS use vmsish; use vmsish 'status';# or '$?' use vmsish 'exit'; use vmsish 'time'; use vmsish 'hushed'; no vmsish 'hushed'; vmsish::hushed($hush); use vmsish; no vmsish 'time'; DESCRIPTION If no import list is supplied, all possible VMS-specific features areassumed. Currently, there are four VMS-specific features available:'status' (a.k.a '$?'), 'exit', 'time' and 'hushed'. If you're not running VMS, this module does nothing. vmsish status This makes $? and system return the native VMS exit statusinstead of emulating the POSIX exit status. vmsish exit This makes exit 1 produce a successful exit (with status SS$_NORMAL),instead of emulating UNIX exit(), which considers exit 1 to indicatean error. As with the CRTL's exit() function, exit 0 is also mappedto an exit status of SS$_NORMAL, and any other argument to exit() isused directly as Perl's exit status. vmsish time This makes all times relative to the local time zone, instead of thedefault of Universal Time (a.k.a Greenwich Mean Time, or GMT). vmsish hushed This suppresses printing of VMS status messages to SYS$OUTPUT andSYS$ERROR if Perl terminates with an error status. and allowsprograms that are expecting "unix-style" Perl to avoid having to parseVMS error messages. It does not suppress any messages from Perlitself, just the messages generated by DCL after Perl exits. The DCLsymbol $STATUS will still have the termination status, but with ahigh-order bit set: EXAMPLE:$ perl -e"exit 44;" Non-hushed error exit%SYSTEM-F-ABORT, abort DCL message$ show sym $STATUS$STATUS == "%X0000002C" $ perl -e"use vmsish qw(hushed); exit 44;" Hushed error exit $ show sym $STATUS $STATUS == "%X1000002C" The 'hushed' flag has a global scope during compilation: the exit() ordie() commands that are compiled after 'vmsish hushed' will be hushedwhen they are executed.
    [Show full text]
  • Release Notes (100 001420)
    VERITAS File System™ 3.3.3 Release Notes Solaris January 2000 100-001420 Disclaimer The information contained in this publication is subject to change without notice. VERITAS Software Corporation makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. VERITAS Software Corporation shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual. Copyright Copyright © 2000 VERITAS Software Corporation. All rights reserved. VERITAS is a registered trademark of VERITAS Software Corporation in the US and other countries. The VERITAS logo and VERITAS File System are trademarks of VERITAS Software Corporation. All other trademarks or registered trademarks are the property of their respective owners. Printed in the USA, January 2000. VERITAS Software Corporation 1600 Plymouth St. Mountain View, CA 94043 Phone 650–335–8000 Fax 650–335–8050 www.veritas.com VERITAS File System Release Notes This guide provides information on VERITAS File System™ (VxFS) Release 3.3.3 for Solaris 2.5.1, Solaris 2.6, Solaris 7 (32-bit and 64-bit), and Solaris 8 (32-bit and 64-bit) operating systems. References in this document to VxFS 3.3 regarding new features, end of product support, compatibility, and software limitations apply to VxFS 3.3.3. Review this entire document before installing VxFS. The VERITAS File System packages include VxFS software, documentation,
    [Show full text]
  • Georgia Department of Revenue
    Form MV-9W (Rev. 6-2015) Web and MV Manual Georgia Department of Revenue - Motor Vehicle Division Request for Manufacture of a Special Veteran License Plate ______________________________________________________________________________________ Purpose of this Form: This form is to be used to apply for a military license plate/tag. This form should not be used to record a change of ownership, change of address, or change of license plate classification. Required documentation: You must provide a legible copy of your service discharge (DD-214, DD-215, or for World War II veterans, a WD form) indicating your branch and term of service. If you are an active duty member, a copy of the approved documentation supporting your current membership in the respective reserve or National Guard unit is required. In the case of a retired reserve member from that unit, you must furnish approved documentation supporting the current retired membership status from that reserve unit. OWNER INFORMATION First Name Middle Initial Last Name Suffix Owners’ Full Legal Name: Mailing Address: City: State: Zip: Telephone Number: Owner(s)’ Full Legal Name: First Name Middle Initial Last Name Suffix If secondary Owner(s) are listed Mailing Address: City: State: Zip: Telephone Number: VEHICLE INFORMATION Passenger Vehicle Motorcycle Private Truck Vehicle Identification Number (VIN): Year: Make: Model: CAMPAIGN/TOUR of DUTY Branch of Service: SERVICE AWARD Branch of Service: LICENSE PLATES ______________________ LICENSE PLATES ______________________ World War I World
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [Show full text]
  • Fuzzy Mouse Cursor Control System for Computer Users with Spinal Cord Injuries
    Georgia State University ScholarWorks @ Georgia State University Computer Science Theses Department of Computer Science 8-8-2006 Fuzzy Mouse Cursor Control System for Computer Users with Spinal Cord Injuries Tihomir Surdilovic Follow this and additional works at: https://scholarworks.gsu.edu/cs_theses Part of the Computer Sciences Commons Recommended Citation Surdilovic, Tihomir, "Fuzzy Mouse Cursor Control System for Computer Users with Spinal Cord Injuries." Thesis, Georgia State University, 2006. https://scholarworks.gsu.edu/cs_theses/49 This Thesis is brought to you for free and open access by the Department of Computer Science at ScholarWorks @ Georgia State University. It has been accepted for inclusion in Computer Science Theses by an authorized administrator of ScholarWorks @ Georgia State University. For more information, please contact [email protected]. i Fuzzy Mouse Cursor Control System For Computer Users with Spinal Cord Injuries A Thesis Presented in Partial Fulfillment of Requirements for the Degree of Master of Science in the College of Arts and Sciences Georgia State University 2005 by Tihomir Surdilovic Committee: ____________________________________ Dr. Yan-Qing Zhang, Chair ____________________________________ Dr. Rajshekhar Sunderraman, Member ____________________________________ Dr. Michael Weeks, Member ____________________________________ Dr. Yi Pan, Department Chair Date July 21st 2005 ii Abstract People with severe motor-impairments due to Spinal Cord Injury (SCI) or Spinal Cord Dysfunction (SCD), often experience difficulty with accurate and efficient control of pointing devices (Keates et al., 02). Usually this leads to their limited integration to society as well as limited unassisted control over the environment. The questions “How can someone with severe motor-impairments perform mouse pointer control as accurately and efficiently as an able-bodied person?” and “How can these interactions be advanced through use of Computational Intelligence (CI)?” are the driving forces behind the research described in this paper.
    [Show full text]
  • Moxa Nport Real TTY Driver for Arm-Based Platform Porting Guide
    Moxa NPort Real TTY Driver for Arm-based Platform Porting Guide Moxa Technical Support Team [email protected] Contents 1 Introduction ...................................................................................2 2 Porting to the Moxa UC-Series—Arm-based Computer ....................2 2.1 Build binaries on a general Arm platform ...................................................... 2 2.2 Cross-compiler and the Real TTY driver ........................................................ 3 2.3 Moxa cross-compiling interactive script......................................................... 4 2.4 Manually build the Real TTY driver with a cross-compiler ................................ 5 2.5 Deploy cross-compiled binary to target......................................................... 8 3 Porting to Raspberry Pi OS .............................................................9 4 Porting to the Yocto Project on Raspberry Pi ................................ 10 4.1 Prerequisite............................................................................................... 10 4.2 Create a Moxa layer for the Yocto Project..................................................... 11 4.3 Install a Moxa layer into the Yocto Project.................................................... 17 4.4 Deploy the Yocto image in Raspberry Pi ....................................................... 17 4.5 Start the Real TTY driver in Raspberry Pi ..................................................... 18 4.6 Set the default tty mapping to the Real TTY configuration ............................
    [Show full text]
  • Text Editing in UNIX: an Introduction to Vi and Editing
    Text Editing in UNIX A short introduction to vi, pico, and gedit Copyright 20062009 Stewart Weiss About UNIX editors There are two types of text editors in UNIX: those that run in terminal windows, called text mode editors, and those that are graphical, with menus and mouse pointers. The latter require a windowing system, usually X Windows, to run. If you are remotely logged into UNIX, say through SSH, then you should use a text mode editor. It is possible to use a graphical editor, but it will be much slower to use. I will explain more about that later. 2 CSci 132 Practical UNIX with Perl Text mode editors The three text mode editors of choice in UNIX are vi, emacs, and pico (really nano, to be explained later.) vi is the original editor; it is very fast, easy to use, and available on virtually every UNIX system. The vi commands are the same as those of the sed filter as well as several other common UNIX tools. emacs is a very powerful editor, but it takes more effort to learn how to use it. pico is the easiest editor to learn, and the least powerful. pico was part of the Pine email client; nano is a clone of pico. 3 CSci 132 Practical UNIX with Perl What these slides contain These slides concentrate on vi because it is very fast and always available. Although the set of commands is very cryptic, by learning a small subset of the commands, you can edit text very quickly. What follows is an outline of the basic concepts that define vi.
    [Show full text]