File: example.backslash

package info (click to toggle)
shellia 5.7.6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 728 kB
  • sloc: sh: 7,087; makefile: 34
file content (22 lines) | stat: -rwxr-xr-x 624 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# vim: set filetype=sh :
#        file: example.backslash
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
#     license: GNU General Public License, version 3
# description: check correct output of " in interactive menu and in logfile
#    see also: test.backslash
#
# check correct output of " in interactive menu and in logfile
#
#
set -e
set -u

. ./ia

eval "$ia_init"
x="set \"one two\" \"three\"; /bin/echo \"1=<\$1> 2=<\$2>\""
x="eval \"$(/bin/echo "$x" | ia_easy_backslash)\""
ia_add "$x"
ia_add "eval \"set \\\"one two\\\" \\\"three\\\"; /bin/echo \\\"1=<\\\$1> 2=<\\\$2>\\\"\""
ia