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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Chris F.A. Johnson
About this chapter
Cite this chapter
Johnson, C.F.A. (2010). File Operations and Commands. In: Pro Bash Programming. Apress. https://doi.org/10.1007/978-1-4302-1998-9_8
Download citation
DOI: https://doi.org/10.1007/978-1-4302-1998-9_8
Publisher Name: Apress
Print ISBN: 978-1-4302-1997-2
Online ISBN: 978-1-4302-1998-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books