About 330 results
Open links in new tab
  1. How to echo (print) the value of a variable in Bash?

    Jan 24, 2015 · That is, you need to use a variable name of a variable and this is done with the indirect expansion: you use a variable with the name of the variable and then you evaluate it with the ${!var} syntax. In your case, use: myvar="TEST$response" echo "${!myvar}"

  2. disp - Display value of variable - MATLAB - MathWorks

    disp(X) displays the value of variable X without printing the variable name. Another way to display a variable is to type its name, which displays a leading “X =” before the value. If a variable contains an empty array, disp returns without displaying anything.

  3. Shell Command / Script To Write Simple Output On Screen ... - nixCraft

    Oct 31, 2012 · You can print a variable value with echo or printf command. First define a variable called DDAY: DDAY="15-Aug-2007" Now print a variable using echo command: echo "$DDAY" Output: 15-Aug-2007. Now print a variable using echo command: printf "$DDAY\n" Output: 15-Aug-2007. You can combine a shell variable with statements or command itself:

  4. PowerShell Print Variable [With Examples]

    Aug 27, 2024 · Learn how to print variables in PowerShell with examples. Follow simple steps to display variable values using Write-Output, Write-Host, and other methods.

  5. Bash Print Variable: A Simple Guide to Outputting Values

    In Bash, you can print the value of a variable using the `echo` command followed by the variable name prefixed with a dollar sign. Here's an example: my_variable="Hello, World!"

  6. How to Print Output in Bash [With 6 Practical Examples]

    Apr 29, 2024 · The ‘printf’ command helps users print a simple string with the value assigned to a variable. Review the script below to print a string with variable substitution: #! /bin/bash name= "Jane" printf "Hello, %s!\n" "$name"

  7. Bash printf - How to Print a Variable in Bash - phoenixNAP

    Feb 24, 2022 · Learn to use the bash printf command to print a variable in Bash and format the output. See examples of common printf use cases in Linux.

  8. Print variables to screen in cmd - Spiceworks Community

    Jan 20, 2017 · If you can see what I’m attempting, I’m trying to assign a variable to a command and be able to print that variable later. Every time I get to that part though, it tells me Echo is off. Not sure how to print that line or others as I add to this…

  9. How can I display the contents of an environment variable from …

    Sep 29, 2011 · echo %path:;=&echo.% gets the pretty list of semicolon separated paths. Works if a variable does not contain special characters like & or ^. In Windows Command-Prompt the syntax is echo %PATH% To get a list of all environment variables enter the command set without any parameters.

  10. Print Variable PowerShell: A Quick How-To Guide

    Discover the art of printing variables in PowerShell with our concise guide. Uncover tips and tricks to enhance your scripting skills effortlessly. To print a variable in PowerShell, you can use the `Write-Host` command, which outputs the value of the variable to the console. $greeting = 'Hello, World!' Write-Host $greeting.

Refresh