[ASTPPCOM-812] Community version upgrade v4.0 to 5.0 := When run community upgrade v5.0 scripts in centos server, it getting error as " unexpected token `|' Created: 14/Oct/21  Updated: 19/Oct/21  Resolved: 18/Oct/21

Status: Closed
Project: ASTPP Community
Component/s: None
Affects Version/s: v5.0
Fix Version/s: v5.0

Type: Bug Priority: Highest
Reporter: Prashant Kumar Assignee: Sahil Sheikh (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 50m
Original Estimate: Not Specified

Attachments: PNG File MobaXterm_Personal_20.3_LWfcHgfCpJ.png    
Issue Links:
Relates
relates to ASTPPCOM-804 Community upgrade script verification Done
Reproducibility: always
Category: Functional
Edition: Community

 Description   

steps :- 

  1. create a instance by using centos operating system.
  2. Set-up community v4.0.1 source code by using centos operating system.
  3. Upgrade to version 5.0
  4. During upgradation check error in console.

Actual result :- When run Community upgrade v5.0 scripts It getting below error :- 

[root@ip-172-31-1-236 src]# /bin/bash community_upgrade_v4_v5_111021.sh Nq1v*1smck25gIMtBJsG
community_upgrade_v4_v5_111021.sh: command substitution: line 4: syntax error near unexpected token `|'
community_upgrade_v4_v5_111021.sh: command substitution: line 4: `| cut -c24-43'
Usage: which [options] [--] COMMAND [...]
Write the full path of COMMAND(s) to standard output.

--version, -[vV] Print version and exit successfully.
--help, Print this help and exit successfully.
--skip-dot Skip directories in PATH that start with a dot.
--skip-tilde Skip directories in PATH that start with a tilde.
--show-dot Don't expand a dot to current directory in output.
--show-tilde Output a tilde for HOME directory for non-root.
--tty-only Stop processing options on the right if not on tty.
--all, -a Print all matches in PATH, not just the first
--read-alias, -i Read list of aliases from stdin.
--skip-alias Ignore option --read-alias; don't read stdin.
--read-functions Read shell functions from stdin.
--skip-functions Ignore option --read-functions; don't read stdin.

Recommended use is to write the output of (alias; declare -f) to standard
input, so that which can show aliases and shell functions. See which(1) for
examples.

If the options --read-alias and/or --read-functions are specified then the
output can be a full alias or function definition, optionally followed by
the full path of each command used inside of those.

Report bugs to <which-bugs@gnu.org>.
community_upgrade_v4_v5_111021.sh: command substitution: line 6: syntax error near unexpected token `|'
community_upgrade_v4_v5_111021.sh: command substitution: line 6: `| grep dbpass | cut -c10-29'
community_upgrade_v4_v5_111021.sh: line 9: syntax error near unexpected token `('
community_upgrade_v4_v5_111021.sh: line 9: `${FILE} | cut -c1-1` size=$(( $size + 0 )) get_linux_distribution () {'
[root@ip-172-31-1-236 src]#

 

Expected result :- it should be upgrade successfully.

See Screenshot :- 



 Comments   
Comment by Sahil Sheikh (Inactive) [ 18/Oct/21 ]

Hello Prashant Kumar, As discussed on thurday on skype, This is due to the copy paste issue you are having,

When I did that in front of you, it worked fine. So please change your text editor. Let me know if you have any concern.

Thank you

Comment by Prashant Kumar [ 19/Oct/21 ]

verified during upgrade script. working fine. 

Generated at Sat Feb 10 07:20:29 CET 2024 using Jira 8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a.