Skip to main content
added 77 characters in body
Source Link
Stéphane Chazelas
  • 587.9k
  • 96
  • 1.1k
  • 1.7k

There is no need to execute an external program. bash's string manipulation can handle it (also available in kshksh93 (where it comes from) and, zsh and recent versions of mksh, yash and busybox sh (at least)):

$ VERSION='2.3.3' $ echo "${VERSION//.}" 233 

(In those shells' manuals you can generally find this in the parameter expansionparameter expansion section.)

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

$ VERSION='2.3.3' $ echo "${VERSION//.}" 233 

(In those shells' manuals you can find this in the parameter expansion section.)

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh93 (where it comes from), zsh and recent versions of mksh, yash and busybox sh (at least)):

$ VERSION='2.3.3' $ echo "${VERSION//.}" 233 

(In those shells' manuals you can generally find this in the parameter expansion section.)

Adding output to make it more quickly digestible to readers; moved prompts to indicate input vs output
Source Link
Jeff Schaller
  • 68.9k
  • 35
  • 122
  • 268

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

$ VERSION='2.3.3' $ echo "${VERSION//.}" $ 233 

(In those shells' manuals you can find this in the parameter expansion section.)

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

VERSION='2.3.3' echo "${VERSION//.}" $ 233 

(In those shells' manuals you can find this in the parameter expansion section.)

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

$ VERSION='2.3.3' $ echo "${VERSION//.}" 233 

(In those shells' manuals you can find this in the parameter expansion section.)

Adding output to make it more quickly digestible to readers
Source Link

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

VERSION='2.3.3' echo "${VERSION//.}" $ 233 

(In those shells' manuals you can find this in the parameter expansion section.)

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

VERSION='2.3.3' echo "${VERSION//.}" 

(In those shells' manuals you can find this in the parameter expansion section.)

There is no need to execute an external program. bash's string manipulation can handle it (also available in ksh (where it comes from) and zsh):

VERSION='2.3.3' echo "${VERSION//.}" $ 233 

(In those shells' manuals you can find this in the parameter expansion section.)

providing keyword for further reading
Source Link
manatwork
  • 32.1k
  • 8
  • 104
  • 93
Loading
added 58 characters in body
Source Link
Stéphane Chazelas
  • 587.9k
  • 96
  • 1.1k
  • 1.7k
Loading
That's not really parameter expansion is it? My apologies if so.
Source Link
terdon
  • 252.9k
  • 69
  • 481
  • 720
Loading
Source Link
manatwork
  • 32.1k
  • 8
  • 104
  • 93
Loading