[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-687609-105":59,"doc-detail-687609-en":130,"doc-similar-687609":158},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","lecture-11-bash-shell-command-line","Lecture 11 - Bash Shell, Command Line","","Lecture 11 focuses on using the Bash shell and command-line tools for everyday data and text workflows. Topics include navigating the shell, running commands, and working with files and directories. It covers common utilities and habits such as command-line history, TAB-based filename completion, exiting with Control+C, and quitting. The lecture also explains shell customization via .bashrc and .bash_profile, practical use of PATH and which, and Windows-specific setup details such as git-bash path formats and winpty usage.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/lecture-11-bash-shell-command-line/687609/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/lecture-11-bash-shell-command-line/687609.png","ImageObject",300,407,{"name":92,"@type":93},"CatatanPagi","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-11-07",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are the main objectives of Lecture 11?","Question",{"text":112,"@type":113},"The lecture aims to introduce the Bash shell, show how to run commands from the command line, and explain how to interact with text files. It also provides learning resources for Unix shell practice.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How can you navigate and manage files in the shell?",{"text":117,"@type":113},"It introduces key commands such as pwd, cd, and ls, and covers how to use command-line history, TAB for filename completion, and Control+C to quit.",{"name":119,"@type":110,"acceptedAnswer":120},"How do you customize your shell environment in Bash?",{"text":121,"@type":113},"You can customize Bash using .bashrc and .bash_profile, and the lecture highlights using alias commands for common shortcuts and options.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},687609,1794084276,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":81,"preview_urls":145},962090894170,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","|  | Lecture 11:\u003Cbr>Bash Shell, Command Line |\n| --- | --- |\n\nLING 1340/2340: Data Science for Linguists Na-Rae Han  \nObjectives  \n􀁠 Finally, Bash shell  \n􀁠 Running things in command line  \n􀁠 Interacting with text files in command line  \n􀁠 Learning resources section:  \n􀂊  [http://www.pitt.edu/~naraehan/ling1340/resources.html\\#bash](http://www.pitt.edu/~naraehan/ling1340/resources.html#bash)  \n􀂊 Software Carpentry, The Unix Shell:  \n􀂊  [http://swcarpentry.github.io/shell-novice/](http://swcarpentry.github.io/shell-novice/)  \n􀂊 Thirty Useful Unix Commands:  \n􀂊  [http://www.maths.manchester.ac.uk/](http://www.maths.manchester.ac.uk/)~pjohnson/resources/unixShort/examples-commands.pdf  \n􀂊 Ones you do not need:  \n􀂅 compress, finger, lpr, talk  \n􀂅 (Windows) \"more\" is not supported. Use \"less\" instead.  \n Shell introduction, navigating   \n􀁠 Introducing the shell  \n􀂊  [http://swcarpentry.github.io/shell-novice/01-intro/](http://swcarpentry.github.io/shell-novice/01-intro/)  \n􀁠 Navigating & working with files and directories  \n􀂊  [http://swcarpentry.github.io/shell-novice/02-fi](http://swcarpentry.github.io/shell-novice/02-fi)ledir/  \n􀂊  [http://swcarpentry.github.io/shell-novice/03-create/](http://swcarpentry.github.io/shell-novice/03-create/)  \n􀁠 We've been doing some of these already, as part of our git routine. You should know:  \n􀂊 ~  \n. ..  \n􀂊 pwd  \n􀂊 cd  \n􀂊 ls  \n􀂊 Command-line history with 􀁹 and 􀁺  \n􀂊 Using TAB for file name completion  \n􀂊 Using Control+C to quit  \n Settling in, customizing   \n􀁠 You can customize your shell.  \n􀂊 .bashrc  \n􀂊 .bash profile  \n_  \n􀃅 These files store your customization.  \n􀁠 In your home directory:  \n􀂊 your  editor .bash_profile &  \n􀂊 After adding entries or editing, you should either log back in, or execute source .bash_profile.  \n􀁠 Aliasing is the most common customization method:  \nalias calc='/c/windows/system32/calc.exe'  \nalias ls='ls -hF --color=tty '  \n􀃅 Your favorite shortcuts and command-line options  \nMac users: color option isnot supported. Remove the color part.  \nPATH, which, where  \n􀁠 We have been occasionally using pip to install Python libraries. Where is this pip? Which pip are you using?  \nPATH, which, where  \nIf you want to install tweepy for this version of python, you can do:  \n(1) pip3 install tweepy  \n(2) /c/Program\\ Files. . ./Scripts/pip install tweepy  \n(3) cd into /c/Program Files.../Scripts directory and then  \n./pip install tweepy  \nWindows users  \n􀁠 Because git-bash is not a native command-line shell for Windows (cmd is), there are a few additional wrinkles.  \n􀁠 Certain programs are designed to run within a console window. Those need to be prefixed with winpty if you want Python shell.  \n􀂊 winpty python  \n􀁠 Pay attention to your directory path.  \n􀂊 In git-bash, full path starts with /c/ .  \n􀂊 In cmd (Windows native), it is C:\\ ...  \n􀂊 In Python, full path can be written as 'C:/ . . . ' or 'C:\\\\ . . . ' orr'C:\\ . . . ' .  \n􀁠 Not found:  \n􀂊 nano (need to download and do some setting up. See next page.)  \n􀂊 more (use less)  \n􀂊 man (Google stuff up)  \nSetting up nano 2.7.5 to use in Git Bash on Windows  \n1. Download nano-git-0d9a7347243.exe from:  \n􀂊  [https://www.nano-editor.org/dist/win32-support/](https://www.nano-editor.org/dist/win32-support/)  \n2. Rename it nano-git.exe  \n3. Place it under /usr/bin/ .  \n􀂊 This is likely C:\\Program Files\\Git\\usr\\bin if you installed git with default setting.  \n4. Create a script file called nano (without file extension!) in the same /usr/bin/ directory. Put two lines:  \n\\#!/bin/sh  \nSTART //WAIT nano-git.exe \"$@\"  \n5. You can now launch nano editor by simply calling 'nano' or'nano foo.txt'.  \nMac users  \n􀁠 Practice nano.  \n􀁠 Add some aliases.  \n􀁠 Like in Windows, you should be able to launch any app that is found in your PATH.  \n􀁠 Surprise! You also have a handy command for launching any GUI application from command-line.  \n􀂊 open -a Application-Name  \n􀂊  [http://osxdaily.com/2007/02/01/how-to-launch-gui-applications](http://osxdaily.c","cbCaiok2yqwMjJ5K","https://ap.wps.com/l/cbCaiok2yqwMjJ5K","pdf",1062840,27,"English","# Objectives\n# Shell introduction, navigating\n## Introducing the shell\n## Navigating & working with files and directories\n## Command-line history and TAB completion\n# Settling in, customizing\n## Customizing with .bashrc and .bash_profile\n## Aliasing\n# PATH, which, where\n## Locating pip and installing packages\n# Windows and git-bash considerations\n## winpty and path formats\n# Setting up nano on Windows with Git Bash\n# Mac users: using nano and launching GUI apps","[{\"question\":\"What are the main objectives of Lecture 11?\",\"answer\":\"The lecture aims to introduce the Bash shell, show how to run commands from the command line, and explain how to interact with text files. It also provides learning resources for Unix shell practice.\"},{\"question\":\"How can you navigate and manage files in the shell?\",\"answer\":\"It introduces key commands such as pwd, cd, and ls, and covers how to use command-line history, TAB for filename completion, and Control+C to quit.\"},{\"question\":\"How do you customize your shell environment in Bash?\",\"answer\":\"You can customize Bash using .bashrc and .bash_profile, and the lecture highlights using alias commands for common shortcuts and options.\"}]","Lecture 11 - Bash Shell, Command Line | PDF",68,[146,150,154],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d0365504aec6a7c462dfc09e1c6b72a9.webp",983,737,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/bba8615cb4059bbf4c1bbf477f4f71d5.webp",982,736,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/1b1ae3f3afe3d5df01bc6d5d7ba3745c.webp",981,735,{"list":159,"token":66},[160,166,172,179,185,191,198,205,211,217],{"doc_id":161,"doc_title":162,"file_type":137,"home_preview_img_url":163,"slug":164,"view_count":52,"category_name":30,"create_tm":165},671803,"Linux Tutorial - Version 1.21 - Learn Linux command basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988776479/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=ZoSvdKjkSQuB0cYar96e%2FvKBGhw%3D","linux-tutorial-version-121-learn-linux-command-basics",1793580864,{"doc_id":167,"doc_title":168,"file_type":137,"home_preview_img_url":169,"slug":170,"view_count":29,"category_name":30,"create_tm":171},699566,"CS2043-Unix Tools & Scripting - lecture 04","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011312335/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=dJ8JUzs9DeRUbMYbwJUSifD%2F%2B6g%3D","cs2043-unix-tools-scripting-lecture-04",1794479393,{"doc_id":173,"doc_title":174,"file_type":137,"home_preview_img_url":175,"slug":176,"view_count":177,"category_name":30,"create_tm":178},671807,"A Practical Guide to Linux Commands - Editors and Shell Programming - Third Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988776589/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=%2BnBpi1g8IFiuxdbtFhxGcXLhfvY%3D","a-practical-guide-to-linux-commands-editors-and-shell-programming-third-edition",13,1793580874,{"doc_id":180,"doc_title":181,"file_type":137,"home_preview_img_url":182,"slug":183,"view_count":19,"category_name":30,"create_tm":184},699572,"An Introduction to the Linux Command Shell - For Beginners - A GNU Free Documentation License Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011312375/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Skt4k%2Fu12oE3E3ApNveyzfhoXq0%3D","an-introduction-to-the-linux-command-shell-for-beginners-a-gnu-free-documentation-license-manual",1794479414,{"doc_id":186,"doc_title":187,"file_type":137,"home_preview_img_url":188,"slug":189,"view_count":81,"category_name":30,"create_tm":190},699569,"Take Control of the Mac Command Line with Terminal - 3rd Edition - Table of Contents","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011312561/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=kSnHYGtSIWw2hTxdL9E83vaMW7o%3D","take-control-of-the-mac-command-line-with-terminal-3rd-edition-table-of-contents",1794479400,{"doc_id":192,"doc_title":193,"file_type":137,"home_preview_img_url":194,"slug":195,"view_count":196,"category_name":30,"create_tm":197},117655,"Best of Bash 2026 Edition - Unsung Tools for the Shell - Going Deeper","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834701874/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=c6uItJn2O3mk8zsIXslQJZmN%2BD0%3D","best-of-bash-2026-edition-unsung-tools-for-the-shell-going-deeper",38,1785678010,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":203,"category_name":30,"create_tm":204},116713,"BEST of BASH - 2026 Edition - Unsung Command-Line Tools","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834364500/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=t5Y99ZUaDAjwfJyL09LZPvBsa08%3D","best-of-bash-2026-edition-unsung-command-line-tools",41,1785663519,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":34,"category_name":30,"create_tm":210},699571,"BashGuide - About This Guide - Understanding Bash","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010750079/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=EgaTFW0z820YF1YniFesfzKUi7k%3D","bashguide-about-this-guide-understanding-bash",1794479404,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":19,"category_name":30,"create_tm":216},687676,"Linux Aliases and Hidden Files - How to Use Them","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001263267/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=PAyBKs8c8pFBszcINBQ2bNvYm8c%3D","linux-aliases-and-hidden-files-how-to-use-them",1794084498,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":222,"category_name":30,"create_tm":223},22608,"The Ubuntu Issue: Expert Tips for Coding","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229715746384/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=bT6%2F6xMUsNcmdCOPy6m1AG2YAn4%3D","the-ubuntu-issue-expert-tips-for-coding",62,1777611058]