[Touch-packages] [Bug 1958060] Re: bash returns wrong variable value/call more proccesses?

2022-03-18 Thread Launchpad Bug Tracker
[Expired for bash (Ubuntu) because there has been no activity for 60
days.]

** Changed in: bash (Ubuntu)
   Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1958060

Title:
  bash returns wrong variable value/call more proccesses?

Status in bash package in Ubuntu:
  Expired

Bug description:
  Simple function gives different results when interpretator set in first 
string of script
  CHECKPROC()
  {
  i=$(ps aux | grep -c $0)
  ps aux | grep -c $0
  echo variable is $i
  sleep 10
  }
  CHECKPROC

  Expected
  In any conditions it will return same values, then will increments when other 
copies of script  will be found in proccesses list.

  Happened.
  We set interpretator with #!/bin/bash or #!/bin/sh in first string of script 
and runs multiple copies of script from one terminal with & after scriptname. 
It's returns "1" and "variable is 1" always.
  Without interpretator setup, when string #!/bin/bash or #!/bin/sh deleted.
  Run multiple copies scriptname.sh&
  On every iteration it returns right first value and "variable is $value+1"

  $scriptname.sh&
  2
  variable is 3
  $scriptname.sh&
  3
  variable is 4
  ...and so on.

  Without counting in first case it returns only string with grep, in
  second case -- one more string with different PID and script name when
  called from i=$(...) or i=`...`

  
  Ubuntu 14.04 x32, bash 4.3.11(1)-release
  Same results from other man on
  GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
  GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

  
  lsb_release -rd
  Description:  Ubuntu 14.04.6 LTS
  Release:  14.04

  apt-cache policy bash
  bash:
Установлен: 4.3-7ubuntu1.7
Кандидат:   4.3-7ubuntu1.7
Таблица версий:
   4.3-7ubuntu1.8+esm1 0
 -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 
Packages
   *** 4.3-7ubuntu1.7 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 
Packages
  100 /var/lib/dpkg/status
   4.3-6ubuntu1 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1958060/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1958060] Re: bash returns wrong variable value/call more proccesses?

2022-01-17 Thread Dark Archangel
Brian Murray (brian-murray)
It's tested other man on ubuntu 20.04 x64 and apple mac pro with m1 pro CPU.
GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
I will test it from lubuntu 20.04 x64 livecd and will add new results.

...
Tested on Lubuntu 20.04, results are the same.
https://sun9-21.userapi.com/impg/epKIlh1A6x-RtHgZ5EUERBK59vFYIAJcg_c3YQ/7iW2z_L1Ajc.jpg?size=1063x500&quality=95&sign=cae5f41c4a9a41ffc7d0ad65bde94db8&type=album

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1958060

Title:
  bash returns wrong variable value/call more proccesses?

Status in bash package in Ubuntu:
  Incomplete

Bug description:
  Simple function gives different results when interpretator set in first 
string of script
  CHECKPROC()
  {
  i=$(ps aux | grep -c $0)
  ps aux | grep -c $0
  echo variable is $i
  sleep 10
  }
  CHECKPROC

  Expected
  In any conditions it will return same values, then will increments when other 
copies of script  will be found in proccesses list.

  Happened.
  We set interpretator with #!/bin/bash or #!/bin/sh in first string of script 
and runs multiple copies of script from one terminal with & after scriptname. 
It's returns "1" and "variable is 1" always.
  Without interpretator setup, when string #!/bin/bash or #!/bin/sh deleted.
  Run multiple copies scriptname.sh&
  On every iteration it returns right first value and "variable is $value+1"

  $scriptname.sh&
  2
  variable is 3
  $scriptname.sh&
  3
  variable is 4
  ...and so on.

  Without counting in first case it returns only string with grep, in
  second case -- one more string with different PID and script name when
  called from i=$(...) or i=`...`

  
  Ubuntu 14.04 x32, bash 4.3.11(1)-release
  Same results from other man on
  GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
  GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

  
  lsb_release -rd
  Description:  Ubuntu 14.04.6 LTS
  Release:  14.04

  apt-cache policy bash
  bash:
Установлен: 4.3-7ubuntu1.7
Кандидат:   4.3-7ubuntu1.7
Таблица версий:
   4.3-7ubuntu1.8+esm1 0
 -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 
Packages
   *** 4.3-7ubuntu1.7 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 
Packages
  100 /var/lib/dpkg/status
   4.3-6ubuntu1 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1958060/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1958060] Re: bash returns wrong variable value/call more proccesses?

2022-01-17 Thread Dark Archangel
Brian Murray (brian-murray)
It's tested other man on ubuntu 20.04 x64 and apple mac pro with m1 pro CPU.
GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
I will test it from lubuntu 20.04 x64 livecd and will add new results.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1958060

Title:
  bash returns wrong variable value/call more proccesses?

Status in bash package in Ubuntu:
  Incomplete

Bug description:
  Simple function gives different results when interpretator set in first 
string of script
  CHECKPROC()
  {
  i=$(ps aux | grep -c $0)
  ps aux | grep -c $0
  echo variable is $i
  sleep 10
  }
  CHECKPROC

  Expected
  In any conditions it will return same values, then will increments when other 
copies of script  will be found in proccesses list.

  Happened.
  We set interpretator with #!/bin/bash or #!/bin/sh in first string of script 
and runs multiple copies of script from one terminal with & after scriptname. 
It's returns "1" and "variable is 1" always.
  Without interpretator setup, when string #!/bin/bash or #!/bin/sh deleted.
  Run multiple copies scriptname.sh&
  On every iteration it returns right first value and "variable is $value+1"

  $scriptname.sh&
  2
  variable is 3
  $scriptname.sh&
  3
  variable is 4
  ...and so on.

  Without counting in first case it returns only string with grep, in
  second case -- one more string with different PID and script name when
  called from i=$(...) or i=`...`

  
  Ubuntu 14.04 x32, bash 4.3.11(1)-release
  Same results from other man on
  GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
  GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

  
  lsb_release -rd
  Description:  Ubuntu 14.04.6 LTS
  Release:  14.04

  apt-cache policy bash
  bash:
Установлен: 4.3-7ubuntu1.7
Кандидат:   4.3-7ubuntu1.7
Таблица версий:
   4.3-7ubuntu1.8+esm1 0
 -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 
Packages
   *** 4.3-7ubuntu1.7 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 
Packages
  100 /var/lib/dpkg/status
   4.3-6ubuntu1 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1958060/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1958060] Re: bash returns wrong variable value/call more proccesses?

2022-01-17 Thread Brian Murray
Trusty is no longer a supported release of Ubuntu. Have you tested this
with a supported release of Ubuntu? If so what version of bash were you
using?

** Changed in: bash (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1958060

Title:
  bash returns wrong variable value/call more proccesses?

Status in bash package in Ubuntu:
  Incomplete

Bug description:
  Simple function gives different results when interpretator set in first 
string of script
  CHECKPROC()
  {
  i=$(ps aux | grep -c $0)
  ps aux | grep -c $0
  echo variable is $i
  sleep 10
  }
  CHECKPROC

  Expected
  In any conditions it will return same values, then will increments when other 
copies of script  will be found in proccesses list.

  Happened.
  We set interpretator with #!/bin/bash or #!/bin/sh in first string of script 
and runs multiple copies of script from one terminal with & after scriptname. 
It's returns "1" and "variable is 1" always.
  Without interpretator setup, when string #!/bin/bash or #!/bin/sh deleted.
  Run multiple copies scriptname.sh&
  On every iteration it returns right first value and "variable is $value+1"

  $scriptname.sh&
  2
  variable is 3
  $scriptname.sh&
  3
  variable is 4
  ...and so on.

  Without counting in first case it returns only string with grep, in
  second case -- one more string with different PID and script name when
  called from i=$(...) or i=`...`

  
  Ubuntu 14.04 x32, bash 4.3.11(1)-release
  Same results from other man on
  GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
  GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

  
  lsb_release -rd
  Description:  Ubuntu 14.04.6 LTS
  Release:  14.04

  apt-cache policy bash
  bash:
Установлен: 4.3-7ubuntu1.7
Кандидат:   4.3-7ubuntu1.7
Таблица версий:
   4.3-7ubuntu1.8+esm1 0
 -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 
Packages
   *** 4.3-7ubuntu1.7 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 
Packages
  100 /var/lib/dpkg/status
   4.3-6ubuntu1 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1958060/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1958060] Re: bash returns wrong variable value/call more proccesses?

2022-01-16 Thread Dark Archangel
up.
String without shebang returns 0 for pgrep -c $0 or 1 for ps aux | grep -c $0.
Solved with help of user Valrust from forum.ubuntu.ru, it's standart behavior 
of the system.
In that case new copy of script runs as "bash" without agruments and try to 
find /address/name.sh in ps aux returns nothing, but pgrep -c bash returns more 
and more values depends from run copies.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1958060

Title:
  bash returns wrong variable value/call more proccesses?

Status in bash package in Ubuntu:
  New

Bug description:
  Simple function gives different results when interpretator set in first 
string of script
  CHECKPROC()
  {
  i=$(ps aux | grep -c $0)
  ps aux | grep -c $0
  echo variable is $i
  sleep 10
  }
  CHECKPROC

  Expected
  In any conditions it will return same values, then will increments when other 
copies of script  will be found in proccesses list.

  Happened.
  We set interpretator with #!/bin/bash or #!/bin/sh in first string of script 
and runs multiple copies of script from one terminal with & after scriptname. 
It's returns "1" and "variable is 1" always.
  Without interpretator setup, when string #!/bin/bash or #!/bin/sh deleted.
  Run multiple copies scriptname.sh&
  On every iteration it returns right first value and "variable is $value+1"

  $scriptname.sh&
  2
  variable is 3
  $scriptname.sh&
  3
  variable is 4
  ...and so on.

  Without counting in first case it returns only string with grep, in
  second case -- one more string with different PID and script name when
  called from i=$(...) or i=`...`

  
  Ubuntu 14.04 x32, bash 4.3.11(1)-release
  Same results from other man on
  GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
  GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

  
  lsb_release -rd
  Description:  Ubuntu 14.04.6 LTS
  Release:  14.04

  apt-cache policy bash
  bash:
Установлен: 4.3-7ubuntu1.7
Кандидат:   4.3-7ubuntu1.7
Таблица версий:
   4.3-7ubuntu1.8+esm1 0
 -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 
Packages
   *** 4.3-7ubuntu1.7 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 
Packages
  100 /var/lib/dpkg/status
   4.3-6ubuntu1 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1958060/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1958060] Re: bash returns wrong variable value/call more proccesses?

2022-01-16 Thread Paul White
** Package changed: ubuntu => bash (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1958060

Title:
  bash returns wrong variable value/call more proccesses?

Status in bash package in Ubuntu:
  New

Bug description:
  Simple function gives different results when interpretator set in first 
string of script
  CHECKPROC()
  {
  i=$(ps aux | grep -c $0)
  ps aux | grep -c $0
  echo variable is $i
  sleep 10
  }
  CHECKPROC

  Expected
  In any conditions it will return same values, then will increments when other 
copies of script  will be found in proccesses list.

  Happened.
  We set interpretator with #!/bin/bash or #!/bin/sh in first string of script 
and runs multiple copies of script from one terminal with & after scriptname. 
It's returns "1" and "variable is 1" always.
  Without interpretator setup, when string #!/bin/bash or #!/bin/sh deleted.
  Run multiple copies scriptname.sh&
  On every iteration it returns right first value and "variable is $value+1"

  $scriptname.sh&
  2
  variable is 3
  $scriptname.sh&
  3
  variable is 4
  ...and so on.

  Without counting in first case it returns only string with grep, in
  second case -- one more string with different PID and script name when
  called from i=$(...) or i=`...`

  
  Ubuntu 14.04 x32, bash 4.3.11(1)-release
  Same results from other man on
  GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
  GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)

  
  lsb_release -rd
  Description:  Ubuntu 14.04.6 LTS
  Release:  14.04

  apt-cache policy bash
  bash:
Установлен: 4.3-7ubuntu1.7
Кандидат:   4.3-7ubuntu1.7
Таблица версий:
   4.3-7ubuntu1.8+esm1 0
 -32768 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 
Packages
   *** 4.3-7ubuntu1.7 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 
Packages
  500 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 
Packages
  100 /var/lib/dpkg/status
   4.3-6ubuntu1 0
  500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1958060/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp