Skip to main content

File Operations and Commands

  • Chapter
Pro Bash Programming

Abstract

Because the shell is an interpreted language, it is comparatively slow. Many operations on files are best done with external commands that implicitly loop over the lines of a file. At other times, the shell itself is more efficient. This chapter looks at how the shell works with files – both shell options that modify and extend file name expansion and shell options that read and modify the contents of files. Several external commands that work on files are explained, often accompanied by examples of when not to use them.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Chris F. A. Johnson and Jayant Varma

About this chapter

Cite this chapter

Johnson, C.F.A., Varma, J. (2015). File Operations and Commands. In: Pro Bash Programming. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0121-3_8

Download citation

Publish with us

Policies and ethics