Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8670293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:40:41+00:00 2026-06-12T18:40:41+00:00

I found this command. I understand the source reloads the bash profile and fixed

  • 0

I found this command. I understand the source reloads the bash profile and fixed permissions for Ruby permissions needed on Ubuntu. But what does the part before && mean?

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:40:42+00:00Added an answer on June 12, 2026 at 6:40 pm

    Let’s break it down:

    the [[ and ]] enables advanced functionality that is more similar to traditional programming languages, allowing constructs like || instead of -o and && instead of -a.

    For more information on this see How to use double or single brackets, parentheses, curly braces but as far as I know -s does not need the extra functionality and the double brackets could be replaced with single brackets)

    the -s tests whether the file exists and is non-empty

    && will automatically run the command on the right, as long as the command on the left executes without an error return code.

    So, the statement tests whether the file exists and is non-empty, and if so it will source it into the current shell environment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i found this code but do not quite understand what the command is doing.
I have searched this, but I could'n find or understand what I found. Now
I found this tutorial in A Byte of Python, but do not understand it:
I found this command line search and replace example: find . -type f -print0
I have read this thread when I got the the git: command not found
found this little code snippet that seems to do what i want, but im
Found this Multimap containing pairs? , but it is not much help How would
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But
I found this gem https://github.com/michaeledgar/hash_syntax I don't quite understand how I can use it
I understand that this a very noob problem, but when I try to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.