Jackspade9624

variables

Apr 19th, 2025
147
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. Write-Host "The value is: $my_variable"
  2. 3. Examples:
  3. Using a variable in a file path:
  4. Code
  5.  
  6. directory="my_directory"
  7. filename="my_file.txt"
  8. full_path="$directory/$filename"
  9. echo "The full path is: $full_path"
  10. Using a variable in a command-line argument:
  11. Code
  12.  
  13. port="8080"
  14. java -jar my_app.jar -p $port
  15. 4. Considerations:
  16. Quoting: When dealing with variables containing spaces, special characters, or command substitutions, it's often necessary to quote the variable to ensure it is treated correctly. Double quotes are generally preferred in Bash because they allow for command substitution within the value:
  17. Code
  18.  
  19. variable_with_spaces="This variable has spaces"
  20. echo "The value is: $variable_with_spaces"
  21. Command Substitution: You can also use command substitution to assign the output of a command to a variable:
  22. Code
  23.  
  24. current_directory=$(pwd)
  25. echo "The current directory is: $current_directory"
  26. Environment Variables: You can also use environment variables. They are typically uppercase and prefixed with a dollar sign (e.g., $PATH, $HOME).
  27. Code
  28.  
  29. echo "My home directory is: $HOME"
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Pikgikar
    23 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • User was banned
  • Ofmikel
    8 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=pemgqxfmcc
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment