Could not print the temporary variable in the shell command

63 Views Asked by At

I was trying to print the temporary variable in the shell command, but I only got four empty line.

/bin/sh -c "for i in {1..4}; do echo "$i"; done"

My sh version is GNU bash, version 3.2.57(1)-release. The format follows this tutorial.

0

There are 0 best solutions below