Skip to main content
4 of 7
edited title
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117

Why is not $1 printing?

Why echo $1 doesn't print $1 in this simple bash script?

#!/bin/bash
# function.sh
print_something () {
echo $1
}
print_something

$ ./function.sh 123  -> why does not print '123' as result?
pietro letti
  • 429
  • 1
  • 5
  • 11