Ruby Programming Language

Appendices

By

First published on January 30, 2019


Some Useful Code Tidbits

  • “.to_s” added to the end of a variable returns its string attribute. This is quite helpful for outputting combinations of string values and numerical variables.
  • “\n” produces a line feed. It puts output after it to a new line.

Some Useful Unix/Linux Commands

  • pwd to determine the path of your current directory
  • cd directory path and nameto change to the specified directory
  • cd .. to go up one level to the parent directory
  • ls to view the sub-directories and files in a directory
  • ls -l to view a more information-rich list of the sub-directories and files in a directory
  • ls -a to view both the hidden and non-hidden sub-directories and files in a directory. Typically anything that begins with a “.” is hidden.

 


| COURSE |


Content is copyright the author. Layout is copyright Corsbook. See Corsbook.com for further notices.