[LTP] [PATCH 3/6] ftp/ftp01: Remove old-style command substitution

Akihiko Odaki akihiko.odaki@daynix.com
Thu Oct 20 14:07:38 CEST 2022


Suggested-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 testcases/network/tcp_cmds/ftp/ftp01.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testcases/network/tcp_cmds/ftp/ftp01.sh b/testcases/network/tcp_cmds/ftp/ftp01.sh
index 2d61377b3..f8a3c98e8 100755
--- a/testcases/network/tcp_cmds/ftp/ftp01.sh
+++ b/testcases/network/tcp_cmds/ftp/ftp01.sh
@@ -79,8 +79,8 @@ do_test()
                         echo $a $j
                         echo quit
                     } | ftp -nv $RHOST
-                    SUM1=`ls -l $j  | awk '{print $5}'`
-                    SUM2=`ls -l $TST_NET_DATAROOT/$j | awk '{print $5}'`
+                    SUM1="$(ls -l $j  | awk '{print $5}')"
+                    SUM2="$(ls -l $TST_NET_DATAROOT/$j | awk '{print $5}')"
                     rm -f $j
                 else
                     {
@@ -91,8 +91,8 @@ do_test()
                         echo $a $j
                         echo quit
                     } | ftp -nv $RHOST
-                    SUM1=`tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}'`
-                    SUM2=`sum $TST_NET_DATAROOT/$j | awk '{print $1}'`
+                    SUM1="$(tst_rhost_run -c "sum $TST_TMPDIR/$j" -s | awk '{print $1}')"
+                    SUM2="$(sum $TST_NET_DATAROOT/$j | awk '{print $1}')"
                     tst_rhost_run -c "rm -f $TST_TMPDIR/$j"
                 fi
 
-- 
2.37.3



More information about the ltp mailing list