Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 921 Bytes

File metadata and controls

40 lines (32 loc) · 921 Bytes

img

shell variable expansion quizes

Question #0

What is the variable name who contains the previous working directory path?

  • OLDDIR
  • OLDPWD
  • PREVPWD
  • PREVDIR

Question #1

Which command should I use to display the exit code of the previous command?

  • echo $?
  • echo ?
  • echo $EXITCODE
  • echo $CODE

Question #2

Which command should I use to display a variable?

  • export $MYVAR
  • ls $MYVAR
  • cd $MYVAR
  • echo $MYVAR

Question #3

Which command should I use to define a new command push for pushing in Github?

Example:

$ push 
Everything up-to-date
$
  • alias push=git push
  • alias push="git push"
  • export push="git push"
  • export push=git push