Skip to main content
Add bash variable
Source Link
WinEunuuchs2Unix
  • 1.4k
  • 1
  • 14
  • 29

Fastest and simplest (IMO) method is:

bash_var=$(stat -c %s /path/to/filename)

Fastest and simplest (IMO) method is:

stat -c %s /path/to/filename

Fastest and simplest (IMO) method is:

bash_var=$(stat -c %s /path/to/filename)
Source Link
WinEunuuchs2Unix
  • 1.4k
  • 1
  • 14
  • 29

Fastest and simplest (IMO) method is:

stat -c %s /path/to/filename