├── examples ├── dnsd.conf ├── bootfloppy │ └── etc │ │ ├── fstab │ │ ├── init.d │ │ └── rcS │ │ └── inittab ├── var_service │ ├── dhcp_if │ │ └── log │ │ │ └── run │ ├── dnsmasq │ │ └── log │ │ │ └── run │ ├── ftpd │ │ └── log │ │ │ └── run │ ├── httpd │ │ └── log │ │ │ └── run │ ├── inetd │ │ └── log │ │ │ └── run │ ├── ntpd │ │ └── log │ │ │ └── run │ ├── tftpd │ │ └── log │ │ │ └── run │ ├── zcip_if │ │ └── log │ │ │ └── run │ ├── dhcpd_if │ │ ├── log │ │ │ └── run │ │ ├── w_dumpleases │ │ └── w_dumpleases_countdown │ ├── ifplugd_if │ │ └── log │ │ │ └── run │ ├── supplicant_if │ │ └── log │ │ │ └── run │ └── getty_tty1 │ │ └── alt08x16+unimap.fnt └── udhcp │ ├── sample.nak │ └── sample.deconfig ├── shell ├── ash_test │ ├── ash-misc │ │ ├── for.right │ │ ├── pid.right │ │ ├── continue2.right │ │ ├── errexit1.right │ │ ├── eval1.right │ │ ├── exit1.right │ │ ├── return1.right │ │ ├── wait4.right │ │ ├── wait6.right │ │ ├── while1.right │ │ ├── while4.right │ │ ├── assignment4.right │ │ ├── break1.right │ │ ├── break3.right │ │ ├── colon.right │ │ ├── continue3.right │ │ ├── empty_for.right │ │ ├── empty_for1.right │ │ ├── export1.right │ │ ├── func4.right │ │ ├── func5.right │ │ ├── last_amp.right │ │ ├── local2.tests │ │ ├── nommu3.right │ │ ├── source2.right │ │ ├── break2.right │ │ ├── command.right │ │ ├── exitcode_trap2.right │ │ ├── if_false_exitcode.right │ │ ├── tickquote1.tests │ │ ├── unicode1.right │ │ ├── until1.right │ │ ├── wait5.right │ │ ├── while2.right │ │ ├── while_in_subshell.right │ │ ├── command.tests │ │ ├── control_char2.right │ │ ├── exitcode1.right │ │ ├── exitcode_trap3.right │ │ ├── exitcode_trap4.right │ │ ├── exitcode_trap6.right │ │ ├── exitcode_trap7.right │ │ ├── func_compound1.right │ │ ├── func_return1.right │ │ ├── func_return2.right │ │ ├── piped_input.right │ │ ├── source1.right │ │ ├── source3.right │ │ ├── wait7.right │ │ ├── assignment3.right │ │ ├── builtin1.right │ │ ├── env_and_func.right │ │ ├── eval2.right │ │ ├── exitcode_EACCES.tests │ │ ├── exitcode_trap1.right │ │ ├── func_local1.right │ │ ├── control_char1.right │ │ ├── nommu2.right │ │ ├── nulltick1.right │ │ ├── opts1.right │ │ ├── control_char3.right │ │ ├── exitcode_trap5.right │ │ ├── export1.tests │ │ ├── func3.right │ │ ├── local1.right │ │ ├── pid.tests │ │ ├── set-n1.right │ │ ├── break4.right │ │ ├── control_char4.right │ │ ├── for.tests │ │ ├── for_with_keywords.right │ │ ├── source2.tests │ │ ├── control_char1.tests │ │ ├── exec.tests │ │ ├── exitcode_ENOENT.tests │ │ ├── nommu1.right │ │ ├── echo_write_error.right │ │ ├── empty_for2.right │ │ ├── local2.right │ │ ├── while1.tests │ │ ├── assignment2.right │ │ ├── break1.tests │ │ ├── errexit1.tests │ │ ├── exec.right │ │ ├── func2.right │ │ ├── func_prio_over_builtins.right │ │ ├── if_false_exitcode.tests │ │ ├── read.tests │ │ ├── wait4.tests │ │ ├── while_in_subshell.tests │ │ ├── continue1.right │ │ ├── control_char2.tests │ │ ├── empty_for.tests │ │ ├── empty_for1.tests │ │ ├── exitcode1.tests │ │ ├── func_compound1.tests │ │ ├── group_in_braces.right │ │ ├── nulltick1.tests │ │ ├── read.right │ │ ├── source5.right │ │ ├── colon.tests │ │ ├── while2.tests │ │ ├── eval1.tests │ │ ├── exitcode_EACCES.right │ │ ├── for_with_keywords.tests │ │ ├── piped_input.tests │ │ ├── source_argv_and_shift.right │ │ ├── tickquote1.right │ │ ├── assignment5.right │ │ ├── assignment2.tests │ │ ├── break3.tests │ │ ├── command2.right │ │ ├── continue2.tests │ │ ├── exitcode_ENOENT.right │ │ ├── func_bash1.right │ │ ├── func_return2.tests │ │ ├── set-n1.tests │ │ ├── wait5.tests │ │ ├── func4.tests │ │ ├── func5.tests │ │ ├── func_local1.tests │ │ ├── break5.right │ │ ├── eval2.tests │ │ ├── for_with_bslashes.right │ │ ├── func_args1.right │ │ ├── exit1.tests │ │ ├── func_local2.right │ │ ├── func_prio_over_builtins.tests │ │ ├── while4.tests │ │ ├── assignment3.tests │ │ ├── func1.right │ │ ├── opts1.tests │ │ ├── control_char3.tests │ │ ├── source1.tests │ │ ├── control_char4.tests │ │ ├── assignment1.right │ │ ├── assignment4.tests │ │ └── compound.right │ ├── ash-alias │ │ ├── alias_case.right │ │ ├── alias_brace.right │ │ └── alias.right │ ├── ash-heredoc │ │ ├── heredocA.right │ │ ├── heredoc4.right │ │ ├── heredoc7.right │ │ ├── heredoc9.right │ │ ├── heredoc2.right │ │ ├── heredoc6.right │ │ ├── heredoc_empty3.right │ │ ├── heredoc_bkslash_newline2.right │ │ ├── heredoc_empty.right │ │ ├── heredoc_side_effects.right │ │ ├── heredoc4.tests │ │ ├── heredoc_after_compound1.right │ │ ├── heredoc1.right │ │ ├── heredoc7.tests │ │ ├── heredocA.tests │ │ ├── heredoc_empty2.right │ │ ├── heredoc_empty3.tests │ │ ├── heredoc_var_expand1.right │ │ ├── heredocB.right │ │ ├── heredoc_bkslash_newline2.tests │ │ ├── heredoc6.tests │ │ ├── heredoc8.tests │ │ ├── heredoc8.right │ │ ├── heredoc_after_compound1.tests │ │ ├── heredoc_backquote1.right │ │ ├── heredoc2.tests │ │ ├── heredoc_empty.tests │ │ ├── heredoc_side_effects.tests │ │ ├── heredoc_huge.right │ │ ├── heredoc_bkslash_newline1.right │ │ ├── heredoc1.tests │ │ └── heredoc5.right │ ├── ash-parsing │ │ ├── argv0.right │ │ ├── eol1.right │ │ ├── noeol.right │ │ ├── noeol2.right │ │ ├── quote1.right │ │ ├── quote2.right │ │ ├── quote4.right │ │ ├── bkslash_eof1.right │ │ ├── group1.right │ │ ├── escape4.right │ │ ├── bkslash_newline3.right │ │ ├── group1.tests │ │ ├── quote1.tests │ │ ├── quote2.tests │ │ ├── starquoted3.right │ │ ├── bkslash_eof1.tests │ │ ├── brace2.right │ │ ├── group2.right │ │ ├── comment2.right │ │ ├── escape1.right │ │ ├── quote4.tests │ │ ├── noeol.tests │ │ ├── bkslash_newline1.right │ │ ├── bkslash_newline4.right │ │ ├── comment1.right │ │ ├── escape2.right │ │ ├── noeol3.tests │ │ ├── and_or_and_backgrounding.right │ │ ├── bkslash_newline2.right │ │ ├── process_subst.right │ │ ├── bkslash_newline3.tests │ │ ├── starquoted3.tests │ │ ├── noeol3.right │ │ ├── escape4.tests │ │ ├── argv0.tests │ │ ├── bkslash_newline2.tests │ │ ├── comment1.tests │ │ ├── escape2.tests │ │ ├── brace1.tests │ │ ├── escape5.right │ │ ├── noeol2.tests │ │ ├── brace2.tests │ │ ├── starquoted.right │ │ ├── escape5.tests │ │ └── process_subst.tests │ ├── ash-psubst │ │ ├── tick.right │ │ ├── tick2.right │ │ ├── falsetick2.right │ │ ├── tick_in_heredoc.right │ │ ├── falsetick2.tests │ │ ├── tick.tests │ │ ├── tick4.right │ │ ├── tick_in_heredoc.tests │ │ ├── tick2.tests │ │ ├── tick_huge.right │ │ └── tick3.right │ ├── ash-read │ │ ├── read_d0.right │ │ ├── read_n.right │ │ ├── read_r.right │ │ ├── read_SIGCHLD.right │ │ ├── read_t0.right │ │ ├── read_t.right │ │ ├── read_d0.tests │ │ ├── read_SIGCHLD.tests │ │ ├── read_r.tests │ │ └── read_REPLY.right │ ├── ash-redir │ │ ├── redir2.right │ │ ├── redir4.right │ │ ├── redir6.right │ │ ├── redir9.right │ │ ├── redirA.right │ │ ├── redir_escapednum.right │ │ ├── redir7.right │ │ ├── redir8.right │ │ ├── redir_leak.right │ │ ├── redir_script.right │ │ ├── redir.right │ │ ├── redir_escapednum.tests │ │ ├── redir_space.right │ │ ├── redir_exec1.tests │ │ ├── redir_stdin1.right │ │ ├── redir9.tests │ │ ├── redir_multi.right │ │ ├── redir_to_bad_fd.right │ │ ├── redir_to_bad_fd3.right │ │ ├── redir3.right │ │ ├── redir6.tests │ │ ├── redir_to_bad_fd255.right │ │ ├── redir_exec1.right │ │ ├── redir_to_bad_fd.tests │ │ ├── redir_to_bad_fd3.tests │ │ ├── redir5.right │ │ └── redir_to_bad_fd255.tests │ ├── ash-signals │ │ ├── reap1.right │ │ ├── save-ret.right │ │ ├── continue_and_trap1.right │ │ ├── signal7.right │ │ ├── signal6.right │ │ ├── signal_read2.right │ │ ├── sigint1.right │ │ ├── return_in_trap1.right │ │ ├── signal8.right │ │ ├── signal9.right │ │ ├── signal2.right │ │ ├── sigquit_exec.right │ │ ├── signal3.right │ │ ├── catch.right │ │ ├── signal6.tests │ │ ├── signal4.tests │ │ ├── signal4.right │ │ └── save-ret.tests │ ├── ash-vars │ │ ├── var_bash7.right │ │ ├── var_leaks.right │ │ ├── var_nested2.right │ │ ├── var-utf8-length.right │ │ ├── var4.right │ │ ├── readonly1.right │ │ ├── var3.right │ │ ├── var_wordsplit_ifs5.right │ │ ├── var-runtime-quote-detection.right │ │ ├── var_10.right │ │ ├── var_bash_repl_unterminated.right │ │ ├── var_bash7.tests │ │ ├── var_bash_repl_empty_pattern.right │ │ ├── var_bash_repl_empty_var.right │ │ ├── glob_and_vars.tests │ │ ├── var-expand-tilde-in-parameter-expansion.right │ │ ├── var_expand_in_redir.right │ │ ├── var-pattern-replacement-in-parameter-expansion-2.right │ │ ├── var-pattern-replacement-in-parameter-expansion-5.right │ │ ├── var2.right │ │ ├── var_bash_repl_unterminated.tests │ │ ├── glob_and_vars.right │ │ ├── var-pattern-replacement-in-parameter-expansion-1.right │ │ ├── var-pattern-replacement-in-parameter-expansion-3.right │ │ ├── var-pattern-replacement-in-parameter-expansion-4.right │ │ ├── var-runtime-quote-detection.tests │ │ ├── var_bash_pattern_starting_with_slash.right │ │ ├── var_in_pipes.right │ │ ├── var_wordsplit_ifs4.right │ │ ├── param_expand_alt2.right │ │ ├── star.right │ │ ├── var-do-not-collapse-arithmetic-expansion-at-parse-time.right │ │ ├── var-do-not-expand-tilde-in-parameter-expansion-in-quotes.right │ │ ├── var2.tests │ │ ├── var_bash_repl_empty_pattern.tests │ │ ├── param_subshell.right │ │ ├── var1.right │ │ ├── var5.right │ │ ├── var_wordsplit_ifs2.right │ │ ├── var_wordsplit_ifs5.tests │ │ ├── var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.right │ │ ├── var-expand-tilde-in-parameter-expansion.tests │ │ ├── var4.tests │ │ ├── var_LINENO1.right │ │ ├── var_LINENO3.right │ │ ├── var-pattern-replacement-in-parameter-expansion-2.tests │ │ ├── var-pattern-replacement-in-parameter-expansion-3.tests │ │ ├── var-pattern-replacement-in-parameter-expansion-4.tests │ │ ├── var-pattern-replacement-in-parameter-expansion-5.tests │ │ ├── param_glob.right │ │ ├── var-pattern-replacement-in-parameter-expansion-1.tests │ │ ├── var_expand_in_assign.right │ │ ├── var_unbackslash1.right │ │ ├── var-do-not-expand-tilde-in-parameter-expansion-in-quotes.tests │ │ ├── var_bash_pattern_starting_with_slash.tests │ │ ├── var_nested1.right │ │ ├── var_10.tests │ │ ├── var_bash6.right │ │ ├── var_bash_repl_empty_var.tests │ │ ├── var_LINENO2.right │ │ ├── param_expand_alt2.tests │ │ ├── var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.tests │ │ ├── var-utf8-length.tests │ │ ├── var3.tests │ │ ├── var6.right │ │ ├── var-do-not-collapse-arithmetic-expansion-at-parse-time.tests │ │ ├── var_leak.right │ │ ├── var_LINENO3.tests │ │ └── var_nested2.tests │ ├── ash-arith │ │ ├── arith_nested1.right │ │ ├── arith-bash1.right │ │ ├── arith_nested1.tests │ │ ├── README.ash │ │ ├── arith-postinc.right │ │ └── arith-bash1.tests │ ├── ash-quoting │ │ ├── case_glob1.right │ │ ├── squote_in_varexp3.right │ │ ├── quote_in_varexp1.right │ │ ├── bkslash_case2.right │ │ ├── squote_in_varexp3.tests │ │ ├── dollar_repl_slash_bash2.right │ │ ├── squote_in_varexp1.right │ │ ├── unicode_8x_chars.right │ │ ├── quote_in_varexp1.tests │ │ ├── dollar_repl_slash_bash2.tests │ │ ├── bkslash_in_varexp.right │ │ ├── bkslash_in_varexp1.right │ │ ├── squote_in_varexp2.right │ │ ├── squote_in_varexp.right │ │ ├── negative_arith.right │ │ ├── bkslash_case1.right │ │ ├── dollar_squote_bash2.right │ │ └── dollar_squote_bash2.tests │ ├── ash-standalone │ │ ├── nofork_trashes_getopt.right │ │ ├── var_standalone1.right │ │ ├── noexec_gets_no_env.right │ │ ├── var_standalone1.tests │ │ ├── noexec_gets_no_env.tests │ │ └── nofork_env.right │ ├── ash-glob │ │ ├── glob1.right │ │ ├── glob_redir.right │ │ ├── glob3.right │ │ ├── glob3.tests │ │ └── glob1.tests │ ├── ash-z_slow │ │ └── many_ifs.right │ ├── .gitignore │ └── ash-invert │ │ └── invert.right └── hush_test │ ├── hush-misc │ ├── for.right │ ├── pid.right │ ├── errexit1.right │ ├── eval1.right │ ├── exit1.right │ ├── return1.right │ ├── while1.right │ ├── while3.right │ ├── while4.right │ ├── break1.right │ ├── break3.right │ ├── colon.right │ ├── continue2.right │ ├── continue3.right │ ├── empty_for.right │ ├── empty_for1.right │ ├── func4.right │ ├── nommu3.right │ ├── source2.right │ ├── wait4.right │ ├── wait6.right │ ├── assignment4.right │ ├── exitcode_trap2.right │ ├── export1.right │ ├── func5.right │ ├── if_false_exitcode.right │ ├── last_amp.right │ ├── while2.right │ ├── break2.right │ ├── control_char2.right │ ├── exitcode1.right │ ├── piped_input.right │ ├── source1.right │ ├── source3.right │ ├── unicode1.right │ ├── until1.right │ ├── wait5.right │ ├── wait7.right │ ├── while_in_subshell.right │ ├── assignment3.right │ ├── env_and_func.right │ ├── exitcode_EACCES.tests │ ├── exitcode_trap3.right │ ├── exitcode_trap4.right │ ├── exitcode_trap6.right │ ├── exitcode_trap7.right │ ├── func_local1.right │ ├── func_return1.right │ ├── func_return2.right │ ├── builtin1.right │ ├── control_char1.right │ ├── eval2.right │ ├── nulltick1.right │ ├── exitcode_trap5.right │ ├── nommu2.right │ ├── opts1.right │ ├── pid.tests │ ├── break4.right │ ├── export1.tests │ ├── func3.right │ ├── local1.right │ ├── set-n1.right │ ├── source2.tests │ ├── tickquote1.right │ ├── wait1.right │ ├── wait2.right │ ├── wait3.right │ ├── for.tests │ ├── for_with_keywords.right │ ├── control_char1.tests │ ├── echo_write_error.right │ ├── exitcode_ENOENT.tests │ ├── nommu1.right │ ├── syntax_err_negate.tests │ ├── wait1.tests │ ├── empty_for2.right │ ├── func2.right │ ├── func_prio_over_builtins.right │ ├── if_false_exitcode.tests │ ├── read.tests │ ├── sig_exitcode.right │ ├── wait4.tests │ ├── while1.tests │ ├── while_in_subshell.tests │ ├── break1.tests │ ├── control_char2.tests │ ├── control_char3.right │ ├── empty_for.tests │ ├── errexit1.tests │ ├── exitcode1.tests │ ├── exitcode_EACCES.right │ ├── group_in_braces.right │ ├── source5.right │ ├── syntax_err.tests │ ├── wait2.tests │ ├── wait3.tests │ ├── assignment2.right │ ├── command2.right │ ├── continue1.right │ ├── control_char4.right │ ├── empty_for1.tests │ ├── nulltick1.tests │ ├── read.right │ ├── while2.tests │ ├── colon.tests │ ├── eval1.tests │ ├── for_with_keywords.tests │ ├── piped_input.tests │ ├── source_argv_and_shift.right │ ├── syntax_err_negate.right │ ├── syntax_err.right │ ├── assignment2.tests │ ├── assignment5.right │ ├── break3.tests │ ├── continue2.tests │ ├── set-n1.tests │ ├── func5.tests │ ├── func_return2.tests │ ├── wait5.tests │ ├── while3.tests │ ├── break5.right │ ├── eval2.tests │ ├── exitcode_ENOENT.right │ ├── func4.tests │ ├── func_args1.right │ ├── func_local1.tests │ ├── exit1.tests │ ├── for_with_bslashes.right │ ├── while4.tests │ ├── assignment3.tests │ ├── func1.right │ ├── func_local2.right │ ├── func_prio_over_builtins.tests │ ├── opts1.tests │ ├── tickquote1.tests │ ├── control_char3.tests │ ├── source1.tests │ ├── source4.right │ └── control_char4.tests │ ├── hush-parsing │ ├── argv0.right │ ├── noeol2.right │ ├── quote2.right │ ├── eol1.right │ ├── group1.right │ ├── noeol.right │ ├── quote1.right │ ├── quote4.right │ ├── bkslash_eof1.right │ ├── escape4.right │ ├── bkslash_newline3.right │ ├── group1.tests │ ├── starquoted3.right │ ├── bkslash_eof1.tests │ ├── group2.right │ ├── quote1.tests │ ├── quote2.tests │ ├── brace2.right │ ├── escape1.right │ ├── quote4.tests │ ├── comment2.right │ ├── noeol.tests │ ├── noeol3.right │ ├── bkslash_newline1.right │ ├── bkslash_newline4.right │ ├── comment1.right │ ├── noeol3.tests │ ├── escape2.right │ ├── bkslash_eof2.right │ ├── and_or_and_backgrounding.right │ ├── bkslash_newline2.right │ ├── process_subst.right │ ├── starquoted3.tests │ ├── bkslash_newline3.tests │ ├── escape4.tests │ ├── argv0.tests │ ├── bkslash_newline2.tests │ ├── escape2.tests │ ├── brace1.tests │ ├── comment1.tests │ ├── escape5.right │ ├── noeol2.tests │ ├── brace2.tests │ ├── groups_and_keywords2.right │ ├── starquoted.right │ ├── escape5.tests │ └── process_subst.tests │ ├── hush-psubst │ ├── tick2.right │ ├── tick5.right │ ├── tick6.right │ ├── tick.right │ ├── falsetick2.right │ ├── tick5.tests │ ├── tick6.tests │ ├── tick_in_heredoc.right │ ├── falsetick2.tests │ ├── tick.tests │ ├── tick_in_heredoc.tests │ ├── tick4.right │ ├── tick2.tests │ ├── falsetick3.right │ ├── tick_huge.right │ └── tick3.right │ ├── hush-read │ ├── read_d0.right │ ├── read_n.right │ ├── read_r.right │ ├── read_SIGCHLD.right │ ├── read_t0.right │ ├── read_t.right │ ├── read_d0.tests │ ├── read_SIGCHLD.tests │ └── read_r.tests │ ├── hush-redir │ ├── redir2.right │ ├── redir4.right │ ├── redir6.right │ ├── redir9.right │ ├── redir_escapednum.right │ ├── redir7.right │ ├── redir8.right │ ├── redirA.right │ ├── redir_script.right │ ├── redir_leak.right │ ├── redir.right │ ├── redir_escapednum.tests │ ├── redir_space.right │ ├── redir_exec1.tests │ ├── redir3.right │ ├── redir_stdin1.right │ ├── redir_to_bad_fd.right │ ├── redir_to_bad_fd3.right │ ├── redir9.tests │ ├── redir_to_bad_fd255.right │ ├── redir6.tests │ ├── redir_multi.right │ ├── redir_exec1.right │ ├── redir_to_bad_fd.tests │ ├── redir_to_bad_fd3.tests │ ├── redir_to_bad_fd255.tests │ └── redir5.right │ ├── hush-signals │ ├── reap1.right │ ├── save-ret.right │ ├── signal7.right │ ├── signal_read1.right │ ├── continue_and_trap1.right │ ├── signal6.right │ ├── signal_read2.right │ ├── return_in_trap1.right │ ├── sigint1.right │ ├── signal8.right │ ├── signal9.right │ ├── signal2.right │ ├── sigquit_exec.right │ ├── signal3.right │ ├── signal4.right │ ├── catch.right │ ├── signal6.tests │ ├── signal4.tests │ └── save-ret.tests │ ├── hush-vars │ ├── var_bash7.right │ ├── var_leaks.right │ ├── var4.right │ ├── var_nested2.right │ ├── var-utf8-length.right │ ├── var_wordsplit_ifs5.right │ ├── var-runtime-quote-detection.right │ ├── var3.right │ ├── var_bash_repl_unterminated.right │ ├── var_10.right │ ├── var_bash7.tests │ ├── var_bash_repl_empty_pattern.right │ ├── var_bash_repl_empty_var.right │ ├── var_preserved.right │ ├── var_expand_in_redir.right │ ├── glob_and_vars.tests │ ├── var-pattern-replacement-in-parameter-expansion-5.right │ ├── var2.right │ ├── var_bash_repl_unterminated.tests │ ├── glob_and_vars.right │ ├── var-pattern-replacement-in-parameter-expansion-1.right │ ├── var-pattern-replacement-in-parameter-expansion-2.right │ ├── var-pattern-replacement-in-parameter-expansion-3.right │ ├── var-pattern-replacement-in-parameter-expansion-4.right │ ├── var-runtime-quote-detection.tests │ ├── var_bash_pattern_starting_with_slash.right │ ├── var_in_pipes.right │ ├── var_wordsplit_ifs4.right │ ├── param_expand_alt2.right │ ├── star.right │ ├── var-do-not-expand-tilde-in-parameter-expansion-in-quotes.right │ ├── var_bash_repl_empty_pattern.tests │ ├── param_subshell.right │ ├── var-do-not-collapse-arithmetic-expansion-at-parse-time.right │ ├── var1.right │ ├── var2.tests │ ├── var_wordsplit_ifs2.right │ ├── var4.tests │ ├── var5.right │ ├── var_LINENO1.right │ ├── var_wordsplit_ifs5.tests │ ├── var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.right │ ├── var-pattern-replacement-in-parameter-expansion-2.tests │ ├── var-pattern-replacement-in-parameter-expansion-3.tests │ ├── var-pattern-replacement-in-parameter-expansion-5.tests │ ├── var_LINENO3.right │ ├── var-pattern-replacement-in-parameter-expansion-4.tests │ ├── var_expand_in_assign.right │ ├── param_glob.right │ ├── readonly3.right │ ├── var-do-not-expand-tilde-in-parameter-expansion-in-quotes.tests │ ├── var-pattern-replacement-in-parameter-expansion-1.tests │ ├── var_bash_pattern_starting_with_slash.tests │ ├── var_nested1.right │ ├── var_unbackslash1.right │ ├── var6.right │ ├── var_10.tests │ ├── var_bash_repl_empty_var.tests │ ├── var_bash6.right │ ├── param_expand_alt2.tests │ ├── var_LINENO2.right │ ├── readonly2.right │ ├── var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.tests │ ├── var-utf8-length.tests │ ├── var3.tests │ ├── var-do-not-collapse-arithmetic-expansion-at-parse-time.tests │ ├── var_nested2.tests │ └── var_LINENO3.tests │ ├── hush-arith │ ├── arith_nested1.right │ ├── arith_nested1.tests │ └── arith-postinc.right │ ├── hush-heredoc │ ├── heredoc4.right │ ├── heredoc9.right │ ├── heredocA.right │ ├── heredoc7.right │ ├── heredoc2.right │ ├── heredoc6.right │ ├── heredoc_empty3.right │ ├── heredoc_bkslash_newline2.right │ ├── heredoc4.tests │ ├── heredoc8.right │ ├── heredoc_after_compound1.right │ ├── heredoc1.right │ ├── heredoc7.tests │ ├── heredocA.tests │ ├── heredoc_empty2.right │ ├── heredoc_empty3.tests │ ├── heredoc_var_expand1.right │ ├── heredocB.right │ ├── heredoc6.tests │ ├── heredoc_bkslash_newline2.tests │ ├── heredoc8.tests │ ├── heredoc_after_compound1.tests │ ├── heredoc2.tests │ ├── heredoc_huge.right │ ├── heredoc_bkslash_newline1.right │ └── heredoc1.tests │ ├── hush-quoting │ ├── case_glob1.right │ ├── squote_in_varexp3.right │ ├── quote_in_varexp1.right │ ├── bkslash_case2.right │ ├── squote_in_varexp3.tests │ ├── dollar_repl_slash_bash2.right │ ├── squote_in_varexp1.right │ ├── unicode_8x_chars.right │ ├── quote_in_varexp1.tests │ ├── bkslash_in_varexp.right │ ├── dollar_repl_slash_bash2.tests │ ├── squote_in_varexp2.right │ ├── bkslash_in_varexp1.right │ ├── squote_in_varexp.right │ ├── negative_arith.right │ └── bkslash_case1.right │ ├── .gitignore │ ├── hush-test2 │ ├── strops4.right │ ├── noglob1.right │ ├── strops5.right │ ├── andor1.right │ ├── strops2.right │ ├── noglob1.tests │ ├── strops3.right │ ├── strops1.right │ └── strops4.tests │ ├── hush-bugs │ ├── strops5_bug.right │ └── export_exp.right │ ├── hush-standalone │ ├── nofork_trashes_getopt.right │ ├── var_standalone1.right │ ├── noexec_gets_no_env.right │ ├── var_standalone1.tests │ ├── noexec_gets_no_env.tests │ └── nofork_env.right │ ├── hush-glob │ ├── glob1.right │ ├── glob3.right │ ├── glob_redir.right │ ├── glob1.tests │ ├── glob3.tests │ └── bash_brace1.right │ ├── hush-leak │ └── leak_argv1.right │ ├── hush-z_slow │ ├── leak_var.right │ ├── many_ifs.right │ ├── leak_all1.right │ ├── leak_all2.right │ ├── leak_var2.right │ ├── leak_var3.right │ ├── leak_empty_tick.right │ └── leak_heredoc1.right │ └── hush-invert │ └── invert.right ├── testsuite ├── uptime │ └── uptime-works ├── bc_arrays_results.txt ├── true │ ├── true-returns-success │ └── true-is-silent ├── false │ ├── false-returns-failure │ └── false-is-silent ├── gunzip.tests ├── id │ ├── id-g-works │ ├── id-u-works │ ├── id-un-works │ └── id-ur-works ├── tar │ ├── tar-demands-at-least-one-ctx │ ├── tar-demands-at-most-one-ctx │ ├── tar-complains-about-missing-file │ ├── tar-extracts-file │ ├── tar-extracts-to-standard-output │ └── tar-extracts-from-standard-input ├── cp │ ├── cp-dev-file │ ├── cp-copies-empty-file │ ├── cp-preserves-source-file │ ├── cp-copies-small-file │ ├── cp-follows-links │ ├── cp-dir-create-dir │ ├── cp-copies-large-file │ ├── cp-dir-existing-dir │ ├── cp-preserves-links │ └── cp-a-preserves-links ├── dirname │ ├── dirname-handles-root │ ├── dirname-handles-empty-path │ ├── dirname-handles-single-component │ ├── dirname-works │ ├── dirname-handles-relative-path │ ├── dirname-handles-absolute-path │ └── dirname-handles-multiple-slashes ├── touch │ ├── touch-creates-file │ ├── touch-does-not-create-file │ └── touch-touches-files-after-non-existent-file ├── dc_misc.dc ├── echo │ ├── echo-prints-argument │ ├── echo-prints-newline │ ├── echo-prints-arguments │ ├── echo-prints-dash │ ├── echo-does-not-print-newline │ └── echo-prints-non-opts ├── hostname │ ├── hostname-works │ ├── hostname-s-works │ └── hostname-d-works ├── mkdir │ ├── mkdir-makes-a-directory │ └── mkdir-makes-parent-directories ├── cut │ ├── cut-cuts-a-character │ ├── cut-cuts-a-closed-range │ ├── cut-cuts-a-field │ ├── cut-cuts-an-open-range │ └── cut-cuts-an-unclosed-range ├── gzip │ ├── gzip-accepts-single-minus │ ├── gzip-removes-original-file │ └── gzip-accepts-multiple-files ├── rm │ └── rm-removes-file ├── bc_pi.bc ├── tr │ └── tr-non-gnu ├── wc │ ├── wc-counts-lines │ ├── wc-counts-words │ ├── wc-counts-characters │ ├── wc-prints-longest-line-length │ └── wc-counts-all ├── basename │ ├── basename-works │ └── basename-does-not-remove-identical-extension ├── mv │ ├── mv-moves-file │ ├── mv-follows-links │ ├── mv-moves-empty-file │ ├── mv-removes-source-file │ ├── mv-moves-hardlinks │ ├── mv-moves-small-file │ ├── mv-moves-unreadable-files │ ├── mv-moves-symlinks │ ├── mv-preserves-links │ └── mv-moves-large-file ├── cat │ └── cat-prints-a-file ├── awk_t1.tar.bz2 ├── dd │ ├── dd-accepts-if │ ├── dd-accepts-of │ ├── dd-reports-write-errors │ ├── dd-copies-from-standard-input-to-standard-output │ ├── dd-prints-count-to-standard-error │ └── dd-count-bytes ├── ls.mk_uni_tests ├── bz2_issue_11.bz2 ├── bz2_issue_12.bz2 ├── tar.utf8.tar.bz2 ├── unlzma_issue_1.lzma ├── unlzma_issue_2.lzma ├── unlzma_issue_3.lzma ├── unzip_bad_lzma_1.zip ├── unzip_bad_lzma_2.zip ├── bc_misc_results.txt ├── rmdir │ └── rmdir-removes-parent-directories ├── gunzip │ └── gunzip-reads-from-standard-input ├── bc_strings_results.txt ├── bunzip2 │ ├── bunzip2-reads-from-standard-input │ └── bunzip2-removes-compressed-file ├── dcx_vars_results.txt ├── find │ └── find-supports-minus-xdev ├── sha3sum.tests ├── bzcat │ └── bzcat-does-not-remove-compressed-file ├── date │ └── date-u-works ├── ln │ ├── ln-creates-hard-links │ └── ln-creates-soft-links ├── wget │ └── wget-handles-empty-path ├── which │ └── which-uses-default-path ├── bc_arrays.bc ├── sha256sum.tests └── tee │ └── tee-tees-input ├── applets └── .gitignore ├── scripts ├── basic │ └── .gitignore └── kconfig │ └── lxdialog │ └── .gitignore ├── modutils └── modutils-24.c ├── docs ├── .gitignore ├── unicode_full-bmp.txt └── unicode_UTF-8-test.txt ├── applets_sh └── nologin └── printutils └── Kbuild.src /examples/dnsd.conf: -------------------------------------------------------------------------------- 1 | thebox 192.168.1.5 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/for.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/pid.right: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/for.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/pid.right: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-alias/alias_case.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredocA.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/continue2.right: -------------------------------------------------------------------------------- 1 | Ok:1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/errexit1.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/eval1.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exit1.right: -------------------------------------------------------------------------------- 1 | Once 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/return1.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/wait4.right: -------------------------------------------------------------------------------- 1 | Three:3 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/wait6.right: -------------------------------------------------------------------------------- 1 | 0 2 | 3 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/while1.right: -------------------------------------------------------------------------------- 1 | OK:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/while4.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/argv0.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/eol1.right: -------------------------------------------------------------------------------- 1 | Done:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/noeol.right: -------------------------------------------------------------------------------- 1 | HELLO 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/noeol2.right: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/quote1.right: -------------------------------------------------------------------------------- 1 | '1' 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/quote2.right: -------------------------------------------------------------------------------- 1 | >1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/quote4.right: -------------------------------------------------------------------------------- 1 | a b 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick2.right: -------------------------------------------------------------------------------- 1 | BAZ 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_d0.right: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir2.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir4.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/reap1.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash7.right: -------------------------------------------------------------------------------- 1 | B 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_leaks.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_nested2.right: -------------------------------------------------------------------------------- 1 | aB 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/errexit1.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/eval1.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exit1.right: -------------------------------------------------------------------------------- 1 | Once 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/return1.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/while1.right: -------------------------------------------------------------------------------- 1 | OK:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/while3.right: -------------------------------------------------------------------------------- 1 | OK:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/while4.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/argv0.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/noeol2.right: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/quote2.right: -------------------------------------------------------------------------------- 1 | >1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick2.right: -------------------------------------------------------------------------------- 1 | BAZ 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick5.right: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick6.right: -------------------------------------------------------------------------------- 1 | 137 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_d0.right: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir2.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir4.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/reap1.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash7.right: -------------------------------------------------------------------------------- 1 | B 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_leaks.right: -------------------------------------------------------------------------------- 1 | OK 2 | -------------------------------------------------------------------------------- /testsuite/uptime/uptime-works: -------------------------------------------------------------------------------- 1 | busybox uptime 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-alias/alias_brace.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-arith/arith_nested1.right: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc4.right: -------------------------------------------------------------------------------- 1 | '$' 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc7.right: -------------------------------------------------------------------------------- 1 | _ASBOX 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc9.right: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment4.right: -------------------------------------------------------------------------------- 1 | Done:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/break1.right: -------------------------------------------------------------------------------- 1 | A 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/break3.right: -------------------------------------------------------------------------------- 1 | A 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/colon.right: -------------------------------------------------------------------------------- 1 | 0 2 | OK: 0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/continue3.right: -------------------------------------------------------------------------------- 1 | 0 2 | 0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/empty_for.right: -------------------------------------------------------------------------------- 1 | OK: 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/empty_for1.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/export1.right: -------------------------------------------------------------------------------- 1 | |\w \\ \ \| 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func4.right: -------------------------------------------------------------------------------- 1 | 24 2 | Done 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func5.right: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/last_amp.right: -------------------------------------------------------------------------------- 1 | 3 2 | End 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/local2.tests: -------------------------------------------------------------------------------- 1 | local x=1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/nommu3.right: -------------------------------------------------------------------------------- 1 | Ok 2 | 0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/source2.right: -------------------------------------------------------------------------------- 1 | Done: 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/bkslash_eof1.right: -------------------------------------------------------------------------------- 1 | ok\ 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/group1.right: -------------------------------------------------------------------------------- 1 | word} } 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/case_glob1.right: -------------------------------------------------------------------------------- 1 | s 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-utf8-length.right: -------------------------------------------------------------------------------- 1 | 26 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var4.right: -------------------------------------------------------------------------------- 1 | bus/usb/1/2 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-arith/arith_nested1.right: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc4.right: -------------------------------------------------------------------------------- 1 | '$' 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc9.right: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredocA.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/break1.right: -------------------------------------------------------------------------------- 1 | A 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/break3.right: -------------------------------------------------------------------------------- 1 | A 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/colon.right: -------------------------------------------------------------------------------- 1 | 0 2 | OK: 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/continue2.right: -------------------------------------------------------------------------------- 1 | Ok:1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/continue3.right: -------------------------------------------------------------------------------- 1 | 0 2 | 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/empty_for.right: -------------------------------------------------------------------------------- 1 | OK: 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/empty_for1.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func4.right: -------------------------------------------------------------------------------- 1 | 24 2 | Done 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/nommu3.right: -------------------------------------------------------------------------------- 1 | Ok 2 | 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/source2.right: -------------------------------------------------------------------------------- 1 | Done: 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/wait4.right: -------------------------------------------------------------------------------- 1 | Three:3 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/wait6.right: -------------------------------------------------------------------------------- 1 | 0 2 | 3 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/eol1.right: -------------------------------------------------------------------------------- 1 | Done:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/group1.right: -------------------------------------------------------------------------------- 1 | word} } 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/noeol.right: -------------------------------------------------------------------------------- 1 | HELLO 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/quote1.right: -------------------------------------------------------------------------------- 1 | '1' 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/quote4.right: -------------------------------------------------------------------------------- 1 | a b 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/case_glob1.right: -------------------------------------------------------------------------------- 1 | s 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var4.right: -------------------------------------------------------------------------------- 1 | bus/usb/1/2 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_nested2.right: -------------------------------------------------------------------------------- 1 | aB 2 | -------------------------------------------------------------------------------- /testsuite/bc_arrays_results.txt: -------------------------------------------------------------------------------- 1 | 2 2 | 4 3 | 2 4 | -------------------------------------------------------------------------------- /testsuite/true/true-returns-success: -------------------------------------------------------------------------------- 1 | busybox true 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-arith/arith-bash1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc2.right: -------------------------------------------------------------------------------- 1 | bar 2 | bar 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/break2.right: -------------------------------------------------------------------------------- 1 | A 2 | AA 3 | OK:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/command.right: -------------------------------------------------------------------------------- 1 | recho: not found 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap2.right: -------------------------------------------------------------------------------- 1 | 42:42 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/if_false_exitcode.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/tickquote1.tests: -------------------------------------------------------------------------------- 1 | echo _`"pwd`_ 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/unicode1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | Ok 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/until1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/wait5.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | Three:3 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/while2.right: -------------------------------------------------------------------------------- 1 | Hello 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/while_in_subshell.right: -------------------------------------------------------------------------------- 1 | OK: 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape4.right: -------------------------------------------------------------------------------- 1 | Ok 2 | End 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/falsetick2.right: -------------------------------------------------------------------------------- 1 | Two:2 v:[] 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/squote_in_varexp3.right: -------------------------------------------------------------------------------- 1 | B 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir6.right: -------------------------------------------------------------------------------- 1 | Hello 2 | OK 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir9.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Done:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redirA.right: -------------------------------------------------------------------------------- 1 | tmp11 2 | tmp11 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_escapednum.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/save-ret.right: -------------------------------------------------------------------------------- 1 | YEAH 2 | 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc7.right: -------------------------------------------------------------------------------- 1 | _ASBOX 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/assignment4.right: -------------------------------------------------------------------------------- 1 | Done:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_trap2.right: -------------------------------------------------------------------------------- 1 | 42:42 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/export1.right: -------------------------------------------------------------------------------- 1 | |\w \\ \ \| 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func5.right: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/if_false_exitcode.right: -------------------------------------------------------------------------------- 1 | Ok:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/last_amp.right: -------------------------------------------------------------------------------- 1 | 3 2 | End 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/while2.right: -------------------------------------------------------------------------------- 1 | Hello 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/bkslash_eof1.right: -------------------------------------------------------------------------------- 1 | ok\ 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/escape4.right: -------------------------------------------------------------------------------- 1 | Ok 2 | End 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/squote_in_varexp3.right: -------------------------------------------------------------------------------- 1 | B 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir6.right: -------------------------------------------------------------------------------- 1 | Hello 2 | OK 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir9.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Done:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_escapednum.right: -------------------------------------------------------------------------------- 1 | Ok 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/save-ret.right: -------------------------------------------------------------------------------- 1 | YEAH 2 | 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-utf8-length.right: -------------------------------------------------------------------------------- 1 | 26 2 | -------------------------------------------------------------------------------- /testsuite/false/false-returns-failure: -------------------------------------------------------------------------------- 1 | ! busybox false 2 | -------------------------------------------------------------------------------- /applets/.gitignore: -------------------------------------------------------------------------------- 1 | /applet_tables 2 | /usage 3 | /usage_pod 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc6.right: -------------------------------------------------------------------------------- 1 | test 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_empty3.right: -------------------------------------------------------------------------------- 1 | 2 | Ok 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/command.tests: -------------------------------------------------------------------------------- 1 | command -p -V recho 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/control_char2.right: -------------------------------------------------------------------------------- 1 |  2 | Done:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode1.right: -------------------------------------------------------------------------------- 1 | One:1 2 | Zero:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap3.right: -------------------------------------------------------------------------------- 1 | TERM 2 | 42:42 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap4.right: -------------------------------------------------------------------------------- 1 | TERM 2 | 11:11 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap6.right: -------------------------------------------------------------------------------- 1 | INT 2 | 42:42 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap7.right: -------------------------------------------------------------------------------- 1 | Start 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_compound1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_return1.right: -------------------------------------------------------------------------------- 1 | Two:2 2 | Two:2 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_return2.right: -------------------------------------------------------------------------------- 1 | Two:2 2 | Two:2 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/piped_input.right: -------------------------------------------------------------------------------- 1 | TEST 2 | One:1 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/source1.right: -------------------------------------------------------------------------------- 1 | Sourced ok 2 | Done 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/source3.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | Zero:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/wait7.right: -------------------------------------------------------------------------------- 1 | Background1 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/bkslash_newline3.right: -------------------------------------------------------------------------------- 1 | a:[a] 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/group1.tests: -------------------------------------------------------------------------------- 1 | { echo word} }; } 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/quote1.tests: -------------------------------------------------------------------------------- 1 | a=1 2 | echo "'$a'" 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/quote2.tests: -------------------------------------------------------------------------------- 1 | a=1 2 | echo ">$a" 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/starquoted3.right: -------------------------------------------------------------------------------- 1 | 2 | <> 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_n.right: -------------------------------------------------------------------------------- 1 | test 2 | tes 3 | tes 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_r.right: -------------------------------------------------------------------------------- 1 | testbest 2 | test\ 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir7.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Done 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir8.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Done 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/continue_and_trap1.right: -------------------------------------------------------------------------------- 1 | Exiting 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal7.right: -------------------------------------------------------------------------------- 1 | Bug detected: 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-standalone/nofork_trashes_getopt.right: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-standalone/var_standalone1.right: -------------------------------------------------------------------------------- 1 | Done: 1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/readonly1.right: -------------------------------------------------------------------------------- 1 | Fail:2 2 | Fail:2 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var3.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 4 | 5 | 0 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_wordsplit_ifs5.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/.gitignore: -------------------------------------------------------------------------------- 1 | *.fail 2 | *.xx 3 | 4 | /hush 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc2.right: -------------------------------------------------------------------------------- 1 | bar 2 | bar 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc6.right: -------------------------------------------------------------------------------- 1 | test 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc_empty3.right: -------------------------------------------------------------------------------- 1 | 2 | Ok 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/break2.right: -------------------------------------------------------------------------------- 1 | A 2 | AA 3 | OK:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/control_char2.right: -------------------------------------------------------------------------------- 1 |  2 | Done:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode1.right: -------------------------------------------------------------------------------- 1 | One:1 2 | Zero:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/piped_input.right: -------------------------------------------------------------------------------- 1 | TEST 2 | One:1 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/source1.right: -------------------------------------------------------------------------------- 1 | Sourced ok 2 | Done 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/source3.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | Zero:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/unicode1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | Ok 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/until1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/wait5.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | Three:3 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/wait7.right: -------------------------------------------------------------------------------- 1 | Background1 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/while_in_subshell.right: -------------------------------------------------------------------------------- 1 | OK: 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/bkslash_newline3.right: -------------------------------------------------------------------------------- 1 | a:[a] 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/group1.tests: -------------------------------------------------------------------------------- 1 | { echo word} }; } 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/starquoted3.right: -------------------------------------------------------------------------------- 1 | 2 | <> 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/falsetick2.right: -------------------------------------------------------------------------------- 1 | Two:2 v:[] 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_n.right: -------------------------------------------------------------------------------- 1 | test 2 | tes 3 | tes 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_r.right: -------------------------------------------------------------------------------- 1 | testbest 2 | test\ 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir7.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Done 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir8.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Done 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redirA.right: -------------------------------------------------------------------------------- 1 | tmp11 2 | tmp11 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal7.right: -------------------------------------------------------------------------------- 1 | Bug detected: 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal_read1.right: -------------------------------------------------------------------------------- 1 | Got HUP:0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/strops4.right: -------------------------------------------------------------------------------- 1 | 1:no:1 2 | 2:YES:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_wordsplit_ifs5.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | -------------------------------------------------------------------------------- /testsuite/gunzip.tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ./bunzip2.tests 4 | -------------------------------------------------------------------------------- /testsuite/id/id-g-works: -------------------------------------------------------------------------------- 1 | test x$(id -g) = x$(busybox id -g) 2 | -------------------------------------------------------------------------------- /testsuite/id/id-u-works: -------------------------------------------------------------------------------- 1 | test x$(id -u) = x$(busybox id -u) 2 | -------------------------------------------------------------------------------- /testsuite/tar/tar-demands-at-least-one-ctx: -------------------------------------------------------------------------------- 1 | ! busybox tar v 2 | -------------------------------------------------------------------------------- /testsuite/tar/tar-demands-at-most-one-ctx: -------------------------------------------------------------------------------- 1 | ! busybox tar tx 2 | -------------------------------------------------------------------------------- /examples/bootfloppy/etc/fstab: -------------------------------------------------------------------------------- 1 | proc /proc proc defaults 0 0 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-glob/glob1.right: -------------------------------------------------------------------------------- 1 | glob1.tests 2 | glob1.tests 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-glob/glob_redir.right: -------------------------------------------------------------------------------- 1 | z.tmp: 2 | ?.tmp: TEST 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_bkslash_newline2.right: -------------------------------------------------------------------------------- 1 | Ok1 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_empty.right: -------------------------------------------------------------------------------- 1 | OK 2 | OK 3 | OK 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_side_effects.right: -------------------------------------------------------------------------------- 1 | NO BUG 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment3.right: -------------------------------------------------------------------------------- 1 | Done:0 2 | abc=123 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/builtin1.right: -------------------------------------------------------------------------------- 1 | VARIABLE=export 2 | OK:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/env_and_func.right: -------------------------------------------------------------------------------- 1 | var=val 2 | var=old 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/eval2.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | Zero:0 3 | Zero:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_EACCES.tests: -------------------------------------------------------------------------------- 1 | ./ 2 | echo $? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap1.right: -------------------------------------------------------------------------------- 1 | Trapped 2 | One:1 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_local1.right: -------------------------------------------------------------------------------- 1 | z=a 2 | z=z 3 | Done 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/bkslash_eof1.tests: -------------------------------------------------------------------------------- 1 | eval 'echo ok\' 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/brace2.right: -------------------------------------------------------------------------------- 1 | {q,w} 2 | {q,w} 3 | Done 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/group2.right: -------------------------------------------------------------------------------- 1 | got TERM 2 | Done: 0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/quote_in_varexp1.right: -------------------------------------------------------------------------------- 1 | '' 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_SIGCHLD.right: -------------------------------------------------------------------------------- 1 | x='Ok' 2 | exitcode:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_t0.right: -------------------------------------------------------------------------------- 1 | ><[0] 2 | ><[0] 3 | ><[1] 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal6.right: -------------------------------------------------------------------------------- 1 | got TERM 2 | Done: 0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-runtime-quote-detection.right: -------------------------------------------------------------------------------- 1 | <> 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_10.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | One:1 3 | Done:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash_repl_unterminated.right: -------------------------------------------------------------------------------- 1 | b/d 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-bugs/strops5_bug.right: -------------------------------------------------------------------------------- 1 | 4:no:1 2 | 5:YES:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc_bkslash_newline2.right: -------------------------------------------------------------------------------- 1 | Ok1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/assignment3.right: -------------------------------------------------------------------------------- 1 | Done:0 2 | abc=123 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/env_and_func.right: -------------------------------------------------------------------------------- 1 | var=val 2 | var=old 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_EACCES.tests: -------------------------------------------------------------------------------- 1 | ./ 2 | echo $? 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_trap3.right: -------------------------------------------------------------------------------- 1 | TERM 2 | 42:42 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_trap4.right: -------------------------------------------------------------------------------- 1 | TERM 2 | 11:11 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_trap6.right: -------------------------------------------------------------------------------- 1 | INT 2 | 42:42 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_trap7.right: -------------------------------------------------------------------------------- 1 | Start 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_local1.right: -------------------------------------------------------------------------------- 1 | z=a 2 | z=z 3 | Done 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_return1.right: -------------------------------------------------------------------------------- 1 | Two:2 2 | Two:2 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_return2.right: -------------------------------------------------------------------------------- 1 | Two:2 2 | Two:2 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/bkslash_eof1.tests: -------------------------------------------------------------------------------- 1 | eval 'echo ok\' 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/group2.right: -------------------------------------------------------------------------------- 1 | got TERM 2 | Done: 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/quote1.tests: -------------------------------------------------------------------------------- 1 | a=1 2 | echo "'$a'" 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/quote2.tests: -------------------------------------------------------------------------------- 1 | a=1 2 | echo ">$a" 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick5.tests: -------------------------------------------------------------------------------- 1 | true; echo `false` $? 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/quote_in_varexp1.right: -------------------------------------------------------------------------------- 1 | '' 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/continue_and_trap1.right: -------------------------------------------------------------------------------- 1 | Exiting 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal6.right: -------------------------------------------------------------------------------- 1 | got TERM 2 | Done: 0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-standalone/nofork_trashes_getopt.right: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-standalone/var_standalone1.right: -------------------------------------------------------------------------------- 1 | Done: 1 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/noglob1.right: -------------------------------------------------------------------------------- 1 | 1:YES:0 2 | 2:YES:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-runtime-quote-detection.right: -------------------------------------------------------------------------------- 1 | <> 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var3.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 4 | 5 | 0 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash_repl_unterminated.right: -------------------------------------------------------------------------------- 1 | b/d 2 | -------------------------------------------------------------------------------- /testsuite/id/id-un-works: -------------------------------------------------------------------------------- 1 | test x$(id -un) = x$(busybox id -un) 2 | -------------------------------------------------------------------------------- /testsuite/id/id-ur-works: -------------------------------------------------------------------------------- 1 | test x$(id -ur) = x$(busybox id -ur) 2 | -------------------------------------------------------------------------------- /examples/bootfloppy/etc/init.d/rcS: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | /bin/mount -a 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-arith/arith_nested1.tests: -------------------------------------------------------------------------------- 1 | echo $(( ( $((1)) ) )) 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-glob/glob3.right: -------------------------------------------------------------------------------- 1 | glob3.tests 2 | ./glob3.tests 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc4.tests: -------------------------------------------------------------------------------- 1 | cat <-10qwertyuiop< 2 | Done 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/comment2.right: -------------------------------------------------------------------------------- 1 | Ok1 2 | Ok2 3 | Ok5 4 | Ok6 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape1.right: -------------------------------------------------------------------------------- 1 | \ 2 | a\b 3 | \\ 4 | c\\d 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/quote4.tests: -------------------------------------------------------------------------------- 1 | a_b='a b' 2 | echo "$a_b" 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/bkslash_case2.right: -------------------------------------------------------------------------------- 1 | ok1 2 | ok2 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_t.right: -------------------------------------------------------------------------------- 1 | >< 2 | >< 3 | >test< 4 | >test< 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal_read2.right: -------------------------------------------------------------------------------- 1 | Hangup 2 | Done:129 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash7.tests: -------------------------------------------------------------------------------- 1 | x=AB; echo "${x#$'\x41'}" 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash_repl_empty_pattern.right: -------------------------------------------------------------------------------- 1 | v 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash_repl_empty_var.right: -------------------------------------------------------------------------------- 1 | 2 | w 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-arith/arith_nested1.tests: -------------------------------------------------------------------------------- 1 | echo $(( ( $((1)) ) )) 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-glob/glob1.right: -------------------------------------------------------------------------------- 1 | glob1.tests 2 | glob1.tests 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-glob/glob3.right: -------------------------------------------------------------------------------- 1 | glob3.tests 2 | ./glob3.tests 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-glob/glob_redir.right: -------------------------------------------------------------------------------- 1 | z.tmp: 2 | ?.tmp: TEST 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc4.tests: -------------------------------------------------------------------------------- 1 | cat <<[0] 2 | ><[0] 3 | ><[1] 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal_read2.right: -------------------------------------------------------------------------------- 1 | Hangup 2 | Done:129 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_10.right: -------------------------------------------------------------------------------- 1 | Zero:0 2 | One:1 3 | Done:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash7.tests: -------------------------------------------------------------------------------- 1 | x=AB; echo "${x#$'\x41'}" 2 | -------------------------------------------------------------------------------- /testsuite/cp/cp-dev-file: -------------------------------------------------------------------------------- 1 | busybox cp /dev/null foo 2 | test -f foo 3 | -------------------------------------------------------------------------------- /testsuite/dirname/dirname-handles-root: -------------------------------------------------------------------------------- 1 | test $(busybox dirname /) = / 2 | -------------------------------------------------------------------------------- /testsuite/false/false-is-silent: -------------------------------------------------------------------------------- 1 | busybox false 2>&1 | cmp - /dev/null 2 | -------------------------------------------------------------------------------- /testsuite/touch/touch-creates-file: -------------------------------------------------------------------------------- 1 | busybox touch foo 2 | test -f foo 3 | -------------------------------------------------------------------------------- /testsuite/true/true-is-silent: -------------------------------------------------------------------------------- 1 | busybox true 2>&1 | cmp - /dev/null 2 | -------------------------------------------------------------------------------- /examples/var_service/dhcp_if/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/dnsmasq/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/ftpd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/httpd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/inetd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/ntpd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/tftpd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/zcip_if/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /scripts/basic/.gitignore: -------------------------------------------------------------------------------- 1 | hash 2 | fixdep 3 | docproc 4 | split-include 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/control_char3.right: -------------------------------------------------------------------------------- 1 | SHELL: line 0: : not found 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_trap5.right: -------------------------------------------------------------------------------- 1 | TERM 2 | Nested 3 | Zero:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/export1.tests: -------------------------------------------------------------------------------- 1 | export Z='\w \\ \ \' 2 | echo "|$Z|" 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func3.right: -------------------------------------------------------------------------------- 1 | One:1 2 | Zero:0 3 | One:1 4 | Five:5 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/local1.right: -------------------------------------------------------------------------------- 1 | A1:'A' 2 | A2:'' 3 | A3:'' 4 | A4:'A' 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/pid.tests: -------------------------------------------------------------------------------- 1 | test `(echo $$)` = `echo $$`; echo $? 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/set-n1.right: -------------------------------------------------------------------------------- 1 | set -n stops in -c? 2 | YES 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/noeol.tests: -------------------------------------------------------------------------------- 1 | # next line has no EOL! 2 | echo HELLO -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick_in_heredoc.right: -------------------------------------------------------------------------------- 1 | 1 2 | 3 | 2 4 | 5 | 3 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/squote_in_varexp3.tests: -------------------------------------------------------------------------------- 1 | x=\'B; echo "${x#\'}" 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_leak.right: -------------------------------------------------------------------------------- 1 | 4 2 | 4 3 | 4 4 | 4 5 | 4 6 | 4 7 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_script.right: -------------------------------------------------------------------------------- 1 | Ok: script fd is not closed 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/sigint1.right: -------------------------------------------------------------------------------- 1 | Sending SIGINT to main shell PID 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-z_slow/many_ifs.right: -------------------------------------------------------------------------------- 1 | # tests 6856 passed 6856 failed 0 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc8.right: -------------------------------------------------------------------------------- 1 | hush: syntax error at 'then' 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc_after_compound1.right: -------------------------------------------------------------------------------- 1 | Ok1 2 | Ok2 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-leak/leak_argv1.right: -------------------------------------------------------------------------------- 1 | Measuring memory leak... 2 | Ok 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_trap5.right: -------------------------------------------------------------------------------- 1 | TERM 2 | Nested 3 | Zero:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/nommu2.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Ok 4 | Ok 5 | Done 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/opts1.right: -------------------------------------------------------------------------------- 1 | Param1: >-10qwertyuiop< 2 | Done 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/pid.tests: -------------------------------------------------------------------------------- 1 | test `(echo $$)` = `echo $$`; echo $? 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/comment2.right: -------------------------------------------------------------------------------- 1 | Ok1 2 | Ok2 3 | Ok5 4 | Ok6 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/noeol.tests: -------------------------------------------------------------------------------- 1 | # next line has no EOL! 2 | echo HELLO -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick6.tests: -------------------------------------------------------------------------------- 1 | true; echo `sh -c 'kill -9 $$'` $? 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick_in_heredoc.right: -------------------------------------------------------------------------------- 1 | 1 2 | 3 | 2 4 | 5 | 3 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/squote_in_varexp3.tests: -------------------------------------------------------------------------------- 1 | x=\'B; echo "${x#\'}" 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_t.right: -------------------------------------------------------------------------------- 1 | >< 2 | >< 3 | >test< 4 | >test< 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_script.right: -------------------------------------------------------------------------------- 1 | Ok: script fd is not closed 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/strops5.right: -------------------------------------------------------------------------------- 1 | 1:YES:0 2 | 2:no:1 3 | 3:YES:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash_repl_empty_pattern.right: -------------------------------------------------------------------------------- 1 | v 2 | Ok:0 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash_repl_empty_var.right: -------------------------------------------------------------------------------- 1 | 2 | w 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_preserved.right: -------------------------------------------------------------------------------- 1 | a=b 2 | a=b 3 | a=b 4 | OK 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-z_slow/leak_var.right: -------------------------------------------------------------------------------- 1 | Measuring memory leak... 2 | Ok 3 | -------------------------------------------------------------------------------- /testsuite/dc_misc.dc: -------------------------------------------------------------------------------- 1 | zp198202389.289374pzp[Hello, World!]pzpzpfrfczpfR 2 | -------------------------------------------------------------------------------- /testsuite/echo/echo-prints-argument: -------------------------------------------------------------------------------- 1 | test xfubar = x`busybox echo fubar` 2 | -------------------------------------------------------------------------------- /testsuite/echo/echo-prints-newline: -------------------------------------------------------------------------------- 1 | test `busybox echo word | wc -c` -eq 5 2 | -------------------------------------------------------------------------------- /testsuite/hostname/hostname-works: -------------------------------------------------------------------------------- 1 | test x$(hostname) = x$(busybox hostname) 2 | -------------------------------------------------------------------------------- /testsuite/mkdir/mkdir-makes-a-directory: -------------------------------------------------------------------------------- 1 | busybox mkdir foo 2 | test -d foo 3 | -------------------------------------------------------------------------------- /examples/var_service/dhcpd_if/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /examples/var_service/ifplugd_if/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /scripts/kconfig/lxdialog/.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # Generated files 3 | # 4 | lxdialog 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-glob/glob3.tests: -------------------------------------------------------------------------------- 1 | echo "glob3.test"* 2 | echo "./glob3.test"* 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc1.right: -------------------------------------------------------------------------------- 1 | qwe 2 | asd 3 | 123 4 | 456 5 | Ok 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc7.tests: -------------------------------------------------------------------------------- 1 | cat << _ACEOF 2 | _ASBOX 3 | _ACEOF 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredocA.tests: -------------------------------------------------------------------------------- 1 | { cat </dev/null 2 | -------------------------------------------------------------------------------- /testsuite/rm/rm-removes-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox rm foo 3 | test ! -f foo 4 | -------------------------------------------------------------------------------- /examples/var_service/supplicant_if/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec std_service_logger 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-arith/README.ash: -------------------------------------------------------------------------------- 1 | there is no support for (( )) constructs in ash 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-glob/glob1.tests: -------------------------------------------------------------------------------- 1 | echo *glob1?t[e]sts* 2 | echo "glob1"?'t'[e]s* 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/control_char1.tests: -------------------------------------------------------------------------------- 1 | echo  2 | echo 'b#c' 3 | echo Done:$? 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exec.tests: -------------------------------------------------------------------------------- 1 | rm -f test1.sh 2 | (exec ./test1.sh) 3 | echo $? 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_ENOENT.tests: -------------------------------------------------------------------------------- 1 | ./does_not_exist_for_sure 2 | echo $? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/nommu1.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Ok 4 | Ok 5 | Ok 6 | Ok 7 | Done 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/bkslash_newline4.right: -------------------------------------------------------------------------------- 1 | 1:1 2 | 22:22 3 | 3:3 4 | Ok:0 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/comment1.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | String: #should-be-echoed 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape2.right: -------------------------------------------------------------------------------- 1 | *?[a]* 2 | a*?[a]*b 3 | *?[a]* 4 | c*?[a]*d 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/noeol3.tests: -------------------------------------------------------------------------------- 1 | # last line has no EOL! 2 | echo "unterminated -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/squote_in_varexp1.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir.right: -------------------------------------------------------------------------------- 1 | ash: write error: Bad file descriptor 2 | TEST 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-2.right: -------------------------------------------------------------------------------- 1 | ax/yc 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-5.right: -------------------------------------------------------------------------------- 1 | axc 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var2.right: -------------------------------------------------------------------------------- 1 | http://busybox.net 2 | http://busybox.net_abc 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash_repl_unterminated.tests: -------------------------------------------------------------------------------- 1 | a=b-c 2 | echo ${a/-*}/d 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-glob/glob1.tests: -------------------------------------------------------------------------------- 1 | echo *glob1?t[e]sts* 2 | echo "glob1"?'t'[e]s* 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-glob/glob3.tests: -------------------------------------------------------------------------------- 1 | echo "glob3.test"* 2 | echo "./glob3.test"* 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc_var_expand1.right: -------------------------------------------------------------------------------- 1 | 2 | Ok1:0 3 | 4 | Ok2:0 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/for.tests: -------------------------------------------------------------------------------- 1 | for i 2 | in OK 3 | do 4 | echo $i 5 | done 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/for_with_keywords.right: -------------------------------------------------------------------------------- 1 | do 2 | done 3 | then 4 | OK: 0 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/bkslash_newline1.right: -------------------------------------------------------------------------------- 1 | and1 2 | and2 3 | or1 4 | ok 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/bkslash_newline4.right: -------------------------------------------------------------------------------- 1 | 1:1 2 | 22:22 3 | 3:3 4 | Ok:0 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/comment1.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | String: #should-be-echoed 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/noeol3.tests: -------------------------------------------------------------------------------- 1 | # last line has no EOL! 2 | echo "unterminated -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/squote_in_varexp1.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/glob_and_vars.tests: -------------------------------------------------------------------------------- 1 | v=. 2 | echo $v/glob_and_vars.[tr]* 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-5.right: -------------------------------------------------------------------------------- 1 | axc 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var2.right: -------------------------------------------------------------------------------- 1 | http://busybox.net 2 | http://busybox.net_abc 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash_repl_unterminated.tests: -------------------------------------------------------------------------------- 1 | a=b-c 2 | echo ${a/-*}/d 3 | -------------------------------------------------------------------------------- /testsuite/bc_pi.bc: -------------------------------------------------------------------------------- 1 | for (i = 0; i <= 100; ++i) { 2 | scale = i 3 | 4 * a(1) 4 | } 5 | -------------------------------------------------------------------------------- /testsuite/cp/cp-copies-empty-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox cp foo bar 3 | cmp foo bar 4 | -------------------------------------------------------------------------------- /testsuite/cut/cut-cuts-a-closed-range: -------------------------------------------------------------------------------- 1 | test $(echo abcd | busybox cut -c 1-2) = ab 2 | -------------------------------------------------------------------------------- /testsuite/cut/cut-cuts-a-field: -------------------------------------------------------------------------------- 1 | test $($ECHO -e "f1\tf2\tf3" | busybox cut -f 2) = f2 2 | -------------------------------------------------------------------------------- /testsuite/cut/cut-cuts-an-open-range: -------------------------------------------------------------------------------- 1 | test $(echo abcd | busybox cut -c -3) = abc 2 | -------------------------------------------------------------------------------- /testsuite/cut/cut-cuts-an-unclosed-range: -------------------------------------------------------------------------------- 1 | test $(echo abcd | busybox cut -c 3-) = cd 2 | -------------------------------------------------------------------------------- /testsuite/dirname/dirname-handles-single-component: -------------------------------------------------------------------------------- 1 | test $(busybox dirname foo) = . 2 | -------------------------------------------------------------------------------- /testsuite/dirname/dirname-works: -------------------------------------------------------------------------------- 1 | test x$(dirname $(pwd)) = x$(busybox dirname $(pwd)) 2 | -------------------------------------------------------------------------------- /testsuite/hostname/hostname-s-works: -------------------------------------------------------------------------------- 1 | test x$(hostname -s) = x$(busybox hostname -s) 2 | -------------------------------------------------------------------------------- /testsuite/touch/touch-does-not-create-file: -------------------------------------------------------------------------------- 1 | busybox touch -c foo 2 | test ! -f foo 3 | -------------------------------------------------------------------------------- /testsuite/tr/tr-non-gnu: -------------------------------------------------------------------------------- 1 | echo fdhrnzvfu bffvsentr | busybox tr '[a-z]' '[n-z][a-m]' 2 | -------------------------------------------------------------------------------- /testsuite/wc/wc-counts-lines: -------------------------------------------------------------------------------- 1 | test `echo i\'m a little teapot | busybox wc -l` -eq 1 2 | -------------------------------------------------------------------------------- /testsuite/wc/wc-counts-words: -------------------------------------------------------------------------------- 1 | test `echo i\'m a little teapot | busybox wc -w` -eq 4 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredocB.right: -------------------------------------------------------------------------------- 1 | one - alpha 2 | two - beta 3 | three - gamma 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_bkslash_newline2.tests: -------------------------------------------------------------------------------- 1 | cat </dev/null 2 | echo Ok 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal8.right: -------------------------------------------------------------------------------- 1 | Removing traps 2 | End of exit_func 3 | Done: 0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal9.right: -------------------------------------------------------------------------------- 1 | Removing traps 2 | End of exit_func 3 | Done: 0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-standalone/noexec_gets_no_env.right: -------------------------------------------------------------------------------- 1 | VAR7=VAL 2 | 0 3 | VAR8=VAL 4 | 0 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/glob_and_vars.right: -------------------------------------------------------------------------------- 1 | ./glob_and_vars.right ./glob_and_vars.tests 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-1.right: -------------------------------------------------------------------------------- 1 | a_\_z_c 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-3.right: -------------------------------------------------------------------------------- 1 | axcabc 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-4.right: -------------------------------------------------------------------------------- 1 | axcaxc 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-runtime-quote-detection.tests: -------------------------------------------------------------------------------- 1 | foo=\\ echo "<${foo#[\\]}>" 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.right: -------------------------------------------------------------------------------- 1 | -dev-ram 2 | /dev-am 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_in_pipes.right: -------------------------------------------------------------------------------- 1 | b=1 2 | b=2 3 | b=3 4 | b=4 5 | b=5 6 | b=6 7 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_wordsplit_ifs4.right: -------------------------------------------------------------------------------- 1 | |x| 2 | Ok1:0 3 | |x| 4 | || 5 | Ok2:0 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredocB.right: -------------------------------------------------------------------------------- 1 | one - alpha 2 | two - beta 3 | three - gamma 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/control_char1.tests: -------------------------------------------------------------------------------- 1 | echo  2 | echo 'b#c' 3 | echo Done:$? 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/echo_write_error.right: -------------------------------------------------------------------------------- 1 | hush: write error: Broken pipe 2 | Ok: 1 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_ENOENT.tests: -------------------------------------------------------------------------------- 1 | ./does_not_exist_for_sure 2 | echo $? 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/nommu1.right: -------------------------------------------------------------------------------- 1 | Ok 2 | Ok 3 | Ok 4 | Ok 5 | Ok 6 | Ok 7 | Done 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/syntax_err_negate.tests: -------------------------------------------------------------------------------- 1 | echo bash 3.2 fails this 2 | ! ! true 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/wait1.tests: -------------------------------------------------------------------------------- 1 | sleep 2 & sleep 1 & wait $! 2 | echo $? 3 | jobs 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/escape2.right: -------------------------------------------------------------------------------- 1 | *?[a]* 2 | a*?[a]*b 3 | *?[a]* 4 | c*?[a]*d 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/unicode_8x_chars.right: -------------------------------------------------------------------------------- 1 | ok 2 | ok 3 | ok 4 | ok 5 | ok 6 | ok 7 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir.right: -------------------------------------------------------------------------------- 1 | hush: write error: Bad file descriptor 2 | TEST 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_escapednum.tests: -------------------------------------------------------------------------------- 1 | echo NOT SHOWN \2>/dev/null 2 | echo Ok 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/glob_and_vars.right: -------------------------------------------------------------------------------- 1 | ./glob_and_vars.right ./glob_and_vars.tests 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-1.right: -------------------------------------------------------------------------------- 1 | a_\_z_c 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-2.right: -------------------------------------------------------------------------------- 1 | ax/yc 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-3.right: -------------------------------------------------------------------------------- 1 | axcabc 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-4.right: -------------------------------------------------------------------------------- 1 | axcaxc 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-runtime-quote-detection.tests: -------------------------------------------------------------------------------- 1 | foo=\\ echo "<${foo#[\\]}>" 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash_pattern_starting_with_slash.right: -------------------------------------------------------------------------------- 1 | -dev-ram 2 | /dev-am 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_in_pipes.right: -------------------------------------------------------------------------------- 1 | b=1 2 | b=2 3 | b=3 4 | b=4 5 | b=5 6 | b=6 7 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_wordsplit_ifs4.right: -------------------------------------------------------------------------------- 1 | |x| 2 | Ok1:0 3 | |x| 4 | || 5 | Ok2:0 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-z_slow/leak_all1.right: -------------------------------------------------------------------------------- 1 | Warm up 2 | Measuring memory leak... 3 | Ok 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-z_slow/leak_all2.right: -------------------------------------------------------------------------------- 1 | Warm up 2 | Measuring memory leak... 3 | Ok 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-z_slow/leak_var2.right: -------------------------------------------------------------------------------- 1 | Warm up 2 | Measuring memory leak... 3 | Ok 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-z_slow/leak_var3.right: -------------------------------------------------------------------------------- 1 | Warm up 2 | Measuring memory leak... 3 | Ok 4 | -------------------------------------------------------------------------------- /testsuite/basename/basename-works: -------------------------------------------------------------------------------- 1 | test x$(basename $(pwd)) = x$(busybox basename $(pwd)) 2 | -------------------------------------------------------------------------------- /testsuite/cp/cp-preserves-source-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox cp foo bar 3 | test -f foo 4 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox mv foo bar 3 | test ! -f foo -a -f bar 4 | -------------------------------------------------------------------------------- /testsuite/wc/wc-counts-characters: -------------------------------------------------------------------------------- 1 | test `echo i\'m a little teapot | busybox wc -c` -eq 20 2 | -------------------------------------------------------------------------------- /modutils/modutils-24.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/modutils/modutils-24.c -------------------------------------------------------------------------------- /shell/ash_test/.gitignore: -------------------------------------------------------------------------------- 1 | /ash 2 | /printenv 3 | /recho 4 | /zecho 5 | 6 | /*.fail 7 | *.xx 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc6.tests: -------------------------------------------------------------------------------- 1 | eval 'cat <<- NOT 2 | test 3 | NOT' 4 | echo OK:$? 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc8.tests: -------------------------------------------------------------------------------- 1 | # ash used to SEGV on this: 2 | 3 | < foo 2 | busybox cat foo >bar 3 | cmp foo bar 4 | -------------------------------------------------------------------------------- /testsuite/cp/cp-copies-small-file: -------------------------------------------------------------------------------- 1 | echo I WANT > foo 2 | busybox cp foo bar 3 | cmp foo bar 4 | -------------------------------------------------------------------------------- /testsuite/dirname/dirname-handles-relative-path: -------------------------------------------------------------------------------- 1 | test $(busybox dirname foo/bar/baz) = foo/bar 2 | -------------------------------------------------------------------------------- /testsuite/gzip/gzip-removes-original-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox gzip foo 3 | test ! -f foo 4 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | /busybox.1 2 | /BusyBox.html 3 | /busybox.net 4 | /BusyBox.txt 5 | /busybox.pod 6 | -------------------------------------------------------------------------------- /docs/unicode_full-bmp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/docs/unicode_full-bmp.txt -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc8.right: -------------------------------------------------------------------------------- 1 | ./heredoc8.tests: line 3: syntax error: unexpected "then" 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_after_compound1.tests: -------------------------------------------------------------------------------- 1 | { cat <\n" "$@"$space 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/quote_in_varexp1.tests: -------------------------------------------------------------------------------- 1 | x="''''"; echo "${x#"${x+''}"''}" 2 | echo Ok:$? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_d0.tests: -------------------------------------------------------------------------------- 1 | printf 'test\0zest\n' | (read -d '' reply; echo "$reply") 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal2.right: -------------------------------------------------------------------------------- 1 | child sleeps 2 | child exits as expected 3 | parent exits 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/sigquit_exec.right: -------------------------------------------------------------------------------- 1 | SigIgn: 0000000000000000 2 | SigIgn: 0000000000000000 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/param_subshell.right: -------------------------------------------------------------------------------- 1 | 1=1 2 | 2=2 3 | 3=3 4 | 4=4 5 | 5=5 6 | 6=6 7 | 7=7 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var1.right: -------------------------------------------------------------------------------- 1 | http://busybox.net 2 | http://busybox.net_abc 3 | 1 1 4 | 1 1 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var5.right: -------------------------------------------------------------------------------- 1 | a=a A=a 2 | a=a A=a 3 | a= A= 4 | a= A= 5 | a=a A=a 6 | a=a A=a 7 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_wordsplit_ifs2.right: -------------------------------------------------------------------------------- 1 | Unquoted:<1> 2 | Unquoted:<3> 3 | Quoted:<123> 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_wordsplit_ifs5.tests: -------------------------------------------------------------------------------- 1 | IFS= 2 | set -- 3 | set -- $@ $* 4 | echo Zero:$# 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc8.tests: -------------------------------------------------------------------------------- 1 | # ash used to SEGV on this: 2 | 3 | <\n" "$@"$space 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/falsetick2.tests: -------------------------------------------------------------------------------- 1 | v=v 2 | v=`exit 2` `false` 3 | echo Two:$? v:"[$v]" 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_d0.tests: -------------------------------------------------------------------------------- 1 | printf 'test\0zest\n' | (read -d '' reply; echo "$reply") 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_space.right: -------------------------------------------------------------------------------- 1 | z1.tmp: 1 2 | z2.tmp: 1 3 | "z1.tmp z2.tmp": TEST 0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/param_subshell.right: -------------------------------------------------------------------------------- 1 | 1=1 2 | 2=2 3 | 3=3 4 | 4=4 5 | 5=5 6 | 6=6 7 | 7=7 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-do-not-collapse-arithmetic-expansion-at-parse-time.right: -------------------------------------------------------------------------------- 1 | 12 2 | 9 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var1.right: -------------------------------------------------------------------------------- 1 | http://busybox.net 2 | http://busybox.net_abc 3 | 1 1 4 | 1 1 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var2.tests: -------------------------------------------------------------------------------- 1 | _1=http://busybox.net 2 | 3 | echo $_1 4 | echo ${_1}_abc 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_wordsplit_ifs2.right: -------------------------------------------------------------------------------- 1 | Unquoted:<1> 2 | Unquoted:<3> 3 | Quoted:<123> 4 | -------------------------------------------------------------------------------- /testsuite/awk_t1.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/awk_t1.tar.bz2 -------------------------------------------------------------------------------- /testsuite/cp/cp-follows-links: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln -s foo bar 3 | busybox cp bar baz 4 | test -f baz 5 | -------------------------------------------------------------------------------- /testsuite/dd/dd-accepts-if: -------------------------------------------------------------------------------- 1 | echo I WANT >foo 2 | test "$(busybox dd if=foo 2>/dev/null)" = "I WANT" 3 | -------------------------------------------------------------------------------- /testsuite/dd/dd-accepts-of: -------------------------------------------------------------------------------- 1 | echo I WANT | busybox dd of=foo 2>/dev/null 2 | echo I WANT | cmp foo - 3 | -------------------------------------------------------------------------------- /testsuite/dirname/dirname-handles-absolute-path: -------------------------------------------------------------------------------- 1 | test $(busybox dirname /foo/bar/baz) = /foo/bar 2 | -------------------------------------------------------------------------------- /testsuite/dirname/dirname-handles-multiple-slashes: -------------------------------------------------------------------------------- 1 | test $(busybox dirname foo/bar///baz) = foo/bar 2 | -------------------------------------------------------------------------------- /testsuite/ls.mk_uni_tests: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/ls.mk_uni_tests -------------------------------------------------------------------------------- /testsuite/mv/mv-follows-links: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln -s foo bar 3 | busybox mv bar baz 4 | test -f baz 5 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-empty-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox mv foo bar 3 | test ! -e foo 4 | test -f bar 5 | -------------------------------------------------------------------------------- /testsuite/wc/wc-prints-longest-line-length: -------------------------------------------------------------------------------- 1 | test `echo i\'m a little teapot | busybox wc -L` -eq 19 2 | -------------------------------------------------------------------------------- /docs/unicode_UTF-8-test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/docs/unicode_UTF-8-test.txt -------------------------------------------------------------------------------- /examples/var_service/dhcpd_if/w_dumpleases: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | watch -n1 'dumpleases -af udhcpd.leases' 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/colon.tests: -------------------------------------------------------------------------------- 1 | false 2 | : 3 | echo $? 4 | (while :; do exit; done) 5 | echo OK: $? 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/while2.tests: -------------------------------------------------------------------------------- 1 | while echo Hello; false; do echo NOT SHOWN; done 2 | echo OK:$? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/noeol3.right: -------------------------------------------------------------------------------- 1 | ./noeol3.tests: line 2: syntax error: unterminated quoted string 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/dollar_repl_slash_bash2.tests: -------------------------------------------------------------------------------- 1 | var="/a/bc/def/file" 2 | echo "${var//\//\\/}" 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_exec1.tests: -------------------------------------------------------------------------------- 1 | v=`echo First >&2` exec >/cant/be/created 2 | echo One:$? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_stdin1.right: -------------------------------------------------------------------------------- 1 | #Testing that stdin redirect is restored 2 | read2 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal3.right: -------------------------------------------------------------------------------- 1 | child sleeps 2 | child got HUP 3 | child exits 4 | parent exits 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.right: -------------------------------------------------------------------------------- 1 | /b/c/ 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-expand-tilde-in-parameter-expansion.tests: -------------------------------------------------------------------------------- 1 | a=~root:~root 2 | echo ${a#~root} 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var4.tests: -------------------------------------------------------------------------------- 1 | X=usbdev1.2 X=${X#usbdev} B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_LINENO1.right: -------------------------------------------------------------------------------- 1 | 2:2 2 | 3:3 3 | 4:4 4 | 5:5 5 | 2:2 6 | 3:3 7 | 4:4 8 | 5:5 9 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_LINENO3.right: -------------------------------------------------------------------------------- 1 | LINENO starts from 0 in -c 2 | and increments on next line: 1 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/assignment2.right: -------------------------------------------------------------------------------- 1 | hush: can't execute 'a=b': No such file or directory 2 | 127 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/command2.right: -------------------------------------------------------------------------------- 1 | test1 2 | hush: can't execute './test2.sh': Permission denied 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/continue1.right: -------------------------------------------------------------------------------- 1 | A:a 2 | A:b 3 | A:c 4 | OK1 5 | A:a 6 | A:b 7 | A:c 8 | OK2 9 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/control_char4.right: -------------------------------------------------------------------------------- 1 | hush: can't execute '-': No such file or directory 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/empty_for1.tests: -------------------------------------------------------------------------------- 1 | false 2 | for v; do 3 | exit 2 4 | done 5 | echo Zero:$? 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/nulltick1.tests: -------------------------------------------------------------------------------- 1 | echo Test ` ` 1 2 | echo Test `&2` exec >/cant/be/created 2 | echo One:$? 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal2.right: -------------------------------------------------------------------------------- 1 | child sleeps 2 | child exits as expected 3 | parent exits 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/sigquit_exec.right: -------------------------------------------------------------------------------- 1 | SigIgn: 0000000000000000 2 | SigIgn: 0000000000000000 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var4.tests: -------------------------------------------------------------------------------- 1 | X=usbdev1.2 X=${X#usbdev} B=${X%%.*} D=${X#*.}; echo bus/usb/$B/$D 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var5.right: -------------------------------------------------------------------------------- 1 | a=a A=a 2 | a=a A=a 3 | a= A= 4 | a= A= 5 | a=a A=a 6 | a=a A=a 7 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_LINENO1.right: -------------------------------------------------------------------------------- 1 | 2:2 2 | 3:3 3 | 4:4 4 | 5:5 5 | 2:2 6 | 3:3 7 | 4:4 8 | 5:5 9 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_wordsplit_ifs5.tests: -------------------------------------------------------------------------------- 1 | IFS= 2 | set -- 3 | set -- $@ $* 4 | echo Zero:$# 5 | -------------------------------------------------------------------------------- /testsuite/basename/basename-does-not-remove-identical-extension: -------------------------------------------------------------------------------- 1 | test xfoo = x`busybox basename foo foo` 2 | -------------------------------------------------------------------------------- /testsuite/bz2_issue_11.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/bz2_issue_11.bz2 -------------------------------------------------------------------------------- /testsuite/bz2_issue_12.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/bz2_issue_12.bz2 -------------------------------------------------------------------------------- /testsuite/cp/cp-dir-create-dir: -------------------------------------------------------------------------------- 1 | mkdir bar 2 | touch bar/baz 3 | busybox cp -R bar foo 4 | test -f foo/baz 5 | -------------------------------------------------------------------------------- /testsuite/mkdir/mkdir-makes-parent-directories: -------------------------------------------------------------------------------- 1 | busybox mkdir -p foo/bar 2 | test -d foo -a -d foo/bar 3 | -------------------------------------------------------------------------------- /testsuite/mv/mv-removes-source-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | busybox mv foo bar 3 | test ! -e foo 4 | test -f bar 5 | -------------------------------------------------------------------------------- /testsuite/tar.utf8.tar.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/tar.utf8.tar.bz2 -------------------------------------------------------------------------------- /examples/udhcp/sample.nak: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Sample udhcpc nak script 3 | 4 | echo Received a NAK: $message 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-arith/arith-postinc.right: -------------------------------------------------------------------------------- 1 | 1 1 2 | 1 1 3 | 1 1 4 | 1 1 5 | 6 6 6 | 7 7 7 | 7 7 8 | Ok:0 9 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_backquote1.right: -------------------------------------------------------------------------------- 1 | heredoc1 2 | Ok1:0 3 | heredoc2 4 | EO`false`F 5 | Ok2:0 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-invert/invert.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 0 5 | 0 6 | 1 7 | 0 8 | 1 9 | 0 10 | 1 11 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/eval1.tests: -------------------------------------------------------------------------------- 1 | # empty eval nevertheless sets $? = 0 2 | false 3 | eval 4 | echo Ok:$? 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_EACCES.right: -------------------------------------------------------------------------------- 1 | ./exitcode_EACCES.tests: line 1: ./: Permission denied 2 | 126 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/for_with_keywords.tests: -------------------------------------------------------------------------------- 1 | for if in do done then; do echo $if; done 2 | echo OK: $? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/piped_input.tests: -------------------------------------------------------------------------------- 1 | exec 2>&1 2 | echo 'echo TEST; false' | $THIS_SH 3 | echo One:$? 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/source_argv_and_shift.right: -------------------------------------------------------------------------------- 1 | sourced_arg1:1 2 | arg1: 3 | sourced_arg1:a 4 | arg1:1 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/tickquote1.right: -------------------------------------------------------------------------------- 1 | ./tickquote1.tests: line 0: syntax error: unterminated quoted string 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape4.tests: -------------------------------------------------------------------------------- 1 | i\ 2 | f tr\ 3 | ue; th\ 4 | en echo "O\ 5 | k"; fi; echo "\ 6 | End" -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick.tests: -------------------------------------------------------------------------------- 1 | true 2 | false; echo `echo $?` 3 | true 4 | { false; echo `echo $?`; } 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/bkslash_in_varexp.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Nothing: 4 | Nothing: 5 | Ok:0 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/bkslash_in_varexp1.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Nothing: 4 | Nothing: 5 | Ok:0 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/squote_in_varexp2.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Nothing: 4 | Nothing: 5 | Ok:0 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir9.tests: -------------------------------------------------------------------------------- 1 | echo Ok >file.tmp 2 | cat 0<>file.tmp 3 | echo Done:$? 4 | rm file.tmp 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-2.tests: -------------------------------------------------------------------------------- 1 | v="abc" 2 | echo ${v/b/x/y} 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-3.tests: -------------------------------------------------------------------------------- 1 | v="abcabc" 2 | echo ${v/b/x} 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-4.tests: -------------------------------------------------------------------------------- 1 | v="abcabc" 2 | echo ${v//b/x} 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-pattern-replacement-in-parameter-expansion-5.tests: -------------------------------------------------------------------------------- 1 | v="ab/c" 2 | echo ${v/b\//x} 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-arith/arith-postinc.right: -------------------------------------------------------------------------------- 1 | 1 1 2 | 1 1 3 | 1 1 4 | 1 1 5 | 6 6 6 | 7 7 7 | 7 7 8 | Ok:0 9 | -------------------------------------------------------------------------------- /shell/hush_test/hush-invert/invert.right: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | 0 5 | 0 6 | 1 7 | 0 8 | 1 9 | 0 10 | 1 11 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/colon.tests: -------------------------------------------------------------------------------- 1 | false 2 | : 3 | echo $? 4 | (while :; do exit; done) 5 | echo OK: $? 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/eval1.tests: -------------------------------------------------------------------------------- 1 | # empty eval nevertheless sets $? = 0 2 | false 3 | eval 4 | echo Ok:$? 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/for_with_keywords.tests: -------------------------------------------------------------------------------- 1 | for if in do done then; do echo $if; done 2 | echo OK: $? 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/piped_input.tests: -------------------------------------------------------------------------------- 1 | exec 2>&1 2 | echo 'echo TEST; false' | $THIS_SH 3 | echo One:$? 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/source_argv_and_shift.right: -------------------------------------------------------------------------------- 1 | sourced_arg1:1 2 | arg1: 3 | sourced_arg1:a 4 | arg1:1 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/syntax_err_negate.right: -------------------------------------------------------------------------------- 1 | bash 3.2 fails this 2 | hush: syntax error: ! ! command 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/escape4.tests: -------------------------------------------------------------------------------- 1 | i\ 2 | f tr\ 3 | ue; th\ 4 | en echo "O\ 5 | k"; fi; echo "\ 6 | End" -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick.tests: -------------------------------------------------------------------------------- 1 | true 2 | false; echo `echo $?` 3 | true 4 | { false; echo `echo $?`; } 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/bkslash_in_varexp.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Nothing: 4 | Nothing: 5 | Ok:0 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/dollar_repl_slash_bash2.tests: -------------------------------------------------------------------------------- 1 | var="/a/bc/def/file" 2 | echo "${var//\//\\/}" 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/squote_in_varexp2.right: -------------------------------------------------------------------------------- 1 | Nothing: 2 | Nothing: 3 | Nothing: 4 | Nothing: 5 | Ok:0 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir3.right: -------------------------------------------------------------------------------- 1 | TEST 2 | hush: can't duplicate file descriptor: Bad file descriptor 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_stdin1.right: -------------------------------------------------------------------------------- 1 | #Testing that stdin redirect is restored 2 | read2 3 | Ok:0 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_to_bad_fd.right: -------------------------------------------------------------------------------- 1 | hush: can't duplicate file descriptor: Bad file descriptor 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_to_bad_fd3.right: -------------------------------------------------------------------------------- 1 | hush: can't duplicate file descriptor: Bad file descriptor 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal3.right: -------------------------------------------------------------------------------- 1 | child sleeps 2 | child got HUP 3 | child exits 4 | parent exits 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/strops2.right: -------------------------------------------------------------------------------- 1 | 1:ERR2:2 2 | 2:YES:0 3 | 3:YES:0 4 | 4:YES:0 5 | 5:no:1 6 | 6:YES:0 7 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.right: -------------------------------------------------------------------------------- 1 | /b/c/ 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-2.tests: -------------------------------------------------------------------------------- 1 | v="abc" 2 | echo ${v/b/x/y} 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-3.tests: -------------------------------------------------------------------------------- 1 | v="abcabc" 2 | echo ${v/b/x} 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-5.tests: -------------------------------------------------------------------------------- 1 | v="ab/c" 2 | echo ${v/b\//x} 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_LINENO3.right: -------------------------------------------------------------------------------- 1 | LINENO starts from 0 in -c 2 | and increments on next line: 1 3 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-hardlinks: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln foo bar 3 | busybox mv bar baz 4 | test ! -f bar -a -f baz 5 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-small-file: -------------------------------------------------------------------------------- 1 | echo I WANT > foo 2 | busybox mv foo bar 3 | test ! -e foo 4 | test -f bar 5 | -------------------------------------------------------------------------------- /testsuite/unlzma_issue_1.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/unlzma_issue_1.lzma -------------------------------------------------------------------------------- /testsuite/unlzma_issue_2.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/unlzma_issue_2.lzma -------------------------------------------------------------------------------- /testsuite/unlzma_issue_3.lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/unlzma_issue_3.lzma -------------------------------------------------------------------------------- /testsuite/unzip_bad_lzma_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/unzip_bad_lzma_1.zip -------------------------------------------------------------------------------- /testsuite/unzip_bad_lzma_2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/testsuite/unzip_bad_lzma_2.zip -------------------------------------------------------------------------------- /applets_sh/nologin: -------------------------------------------------------------------------------- 1 | cat /etc/nologin.txt 2>/dev/null || echo This account is not available 2 | sleep 5 3 | exit 1 4 | -------------------------------------------------------------------------------- /examples/udhcp/sample.deconfig: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Sample udhcpc deconfig script 3 | 4 | ifconfig $interface 0.0.0.0 5 | -------------------------------------------------------------------------------- /examples/var_service/dhcpd_if/w_dumpleases_countdown: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | watch -n1 'dumpleases -f udhcpd.leases' 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-alias/alias.right: -------------------------------------------------------------------------------- 1 | alias: 0 2 | alias: 0 3 | ./alias.tests: line 25: qfoo: not found 4 | quux 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment5.right: -------------------------------------------------------------------------------- 1 | Zero1:0 2 | Zero2:0 3 | Zero3:0 4 | Zero4:0 x:1 y:1 5 | Three:3 x:1 y:1 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/argv0.tests: -------------------------------------------------------------------------------- 1 | if test $# = 0; then 2 | exec "$THIS_SH" "$0" arg 3 | fi 4 | echo OK 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/bkslash_newline2.tests: -------------------------------------------------------------------------------- 1 | echo Line with one backslash: 2 | echo '\ 3 | ' 4 | echo Ok:$? 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/comment1.tests: -------------------------------------------------------------------------------- 1 | echo Nothing: #should-not-be-echoed 2 | echo String: ""#should-be-echoed 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape2.tests: -------------------------------------------------------------------------------- 1 | echo "*?[a]*" 2 | echo a"*?[a]*"b 3 | echo '*?[a]*' 4 | echo c'*?[a]*'d 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick4.right: -------------------------------------------------------------------------------- 1 | (TEST) BEST 2 | TEST) BEST 3 | ((TEST) BEST 4 | ) 5 | abc 6 | a)c 7 | OK: 0 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick_in_heredoc.tests: -------------------------------------------------------------------------------- 1 | cat <file.tmp 2 | cat 0<>file.tmp 3 | echo Done:$? 4 | rm file.tmp 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_to_bad_fd255.right: -------------------------------------------------------------------------------- 1 | hush: can't duplicate file descriptor: Bad file descriptor 2 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/noglob1.tests: -------------------------------------------------------------------------------- 1 | v='*.tests' 2 | [[ *.tests ]]; echo 1:YES:$? 3 | [[ $v ]]; echo 2:YES:$? 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-pattern-replacement-in-parameter-expansion-4.tests: -------------------------------------------------------------------------------- 1 | v="abcabc" 2 | echo ${v//b/x} 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_expand_in_assign.right: -------------------------------------------------------------------------------- 1 | . . 2 | .abc d e. 3 | .abc d e. 4 | .abc d e. 5 | .abc d e. 6 | -------------------------------------------------------------------------------- /testsuite/bc_misc_results.txt: -------------------------------------------------------------------------------- 1 | -1284597623836.9 2 | -1284597623836.9 3 | -4483684050181.80 4 | -4483684050181.80 5 | -------------------------------------------------------------------------------- /testsuite/dd/dd-reports-write-errors: -------------------------------------------------------------------------------- 1 | busybox dd if="$0" of=/dev/full 2>/dev/null || status=$? 2 | test $status = 1 3 | -------------------------------------------------------------------------------- /testsuite/gzip/gzip-accepts-multiple-files: -------------------------------------------------------------------------------- 1 | touch foo bar 2 | busybox gzip foo bar 3 | test -f foo.gz -a -f bar.gz 4 | -------------------------------------------------------------------------------- /testsuite/rmdir/rmdir-removes-parent-directories: -------------------------------------------------------------------------------- 1 | mkdir -p foo/bar 2 | busybox rmdir -p foo/bar 3 | test ! -d foo 4 | -------------------------------------------------------------------------------- /testsuite/tar/tar-complains-about-missing-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | tar cf foo.tar foo 3 | ! busybox tar xf foo.tar bar 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment2.tests: -------------------------------------------------------------------------------- 1 | # This must not be interpreted as an assignment 2 | a''=b true 3 | echo $? 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/break3.tests: -------------------------------------------------------------------------------- 1 | v=break; while true; do echo A; $v; echo B; break; echo C; done 2 | echo OK:$? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/command2.right: -------------------------------------------------------------------------------- 1 | test1 2 | ./command2.tests: ./test1.sh: line 1: ./test2.sh: Permission denied 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/continue2.tests: -------------------------------------------------------------------------------- 1 | e='' 2 | (while test $e && exit 1; true; do e=1; continue; done) 3 | echo Ok:$? 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/brace1.tests: -------------------------------------------------------------------------------- 1 | echo {abc} 2 | echo { 3 | echo } 4 | {cmd 5 | ""{ 6 | {"" 7 | echo Done: $? 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape5.right: -------------------------------------------------------------------------------- 1 | a\nb\nc\n 2 | a 3 | b 4 | c 5 | a\nb\nc\n 6 | a 7 | b 8 | c 9 | Done 10 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick2.tests: -------------------------------------------------------------------------------- 1 | if false; then 2 | echo "FOO" 3 | tmp=`echo BAR >&2` 4 | fi 5 | echo BAZ 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir3.right: -------------------------------------------------------------------------------- 1 | TEST 2 | ./redir3.tests: line 4: 9: Bad file descriptor 3 | Output to fd#9: 1 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir6.tests: -------------------------------------------------------------------------------- 1 | # we had a bug where this would hang 2 | (head -n 1 /dev/null)" = "I WANT" 2 | -------------------------------------------------------------------------------- /testsuite/dd/dd-prints-count-to-standard-error: -------------------------------------------------------------------------------- 1 | echo I WANT | busybox dd of=foo >/dev/null 2>bar 2 | grep -q records bar 3 | -------------------------------------------------------------------------------- /testsuite/gunzip/gunzip-reads-from-standard-input: -------------------------------------------------------------------------------- 1 | echo foo | gzip | busybox gunzip > output 2 | echo foo | cmp - output 3 | -------------------------------------------------------------------------------- /testsuite/tar/tar-extracts-file: -------------------------------------------------------------------------------- 1 | touch foo 2 | tar cf foo.tar foo 3 | rm foo 4 | busybox tar xf foo.tar 5 | test -f foo 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc2.tests: -------------------------------------------------------------------------------- 1 | foo () { 2 | cat </dev/null 3 | ${a=NO} 4 | EOF 5 | echo $a BUG 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exitcode_ENOENT.right: -------------------------------------------------------------------------------- 1 | ./exitcode_ENOENT.tests: line 1: ./does_not_exist_for_sure: not found 2 | 127 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_bash1.right: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 1 5 | 2 6 | 3 7 | 1 8 | 2 9 | 3 10 | 1 11 | 2 12 | 3 13 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_return2.tests: -------------------------------------------------------------------------------- 1 | f1() { return 2; } 2 | f1 3 | echo Two:$? 4 | false 5 | true | f1 6 | echo Two:$? 7 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/set-n1.tests: -------------------------------------------------------------------------------- 1 | $THIS_SH -c "echo 'set -n stops in -c?'; set -n; echo NO" && echo YES 2 | echo Ok:$? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/wait5.tests: -------------------------------------------------------------------------------- 1 | sleep 0 | (sleep 0;exit 3) & 2 | sleep 1 3 | echo Zero:$? 4 | wait %1 5 | echo Three:$? 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/noeol2.tests: -------------------------------------------------------------------------------- 1 | # last line has no EOL! 2 | if true 3 | then 4 | echo 1 5 | else 6 | echo 2 7 | fi -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/negative_arith.right: -------------------------------------------------------------------------------- 1 | tempfile0.tmp tempfile9.tmp 2 | tempfile0.tmp tempfile1.tmp tempfile9.tmp 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_exec1.right: -------------------------------------------------------------------------------- 1 | ./redir_exec1.tests: line 1: can't create /cant/be/created: nonexistent directory 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/catch.right: -------------------------------------------------------------------------------- 1 | sending USR2 2 | caught 3 | sending USR2 4 | sending USR2 5 | User defined signal 2 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal6.tests: -------------------------------------------------------------------------------- 1 | { trap "echo got TERM" TERM; sleep 3; }& sleep 1; kill $!; wait 2 | echo Done: $? 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_10.tests: -------------------------------------------------------------------------------- 1 | set -- : 2 3 4 5 6 7 8 9 ten eleven 2 | echo Zero$10 3 | echo One$11 4 | echo Done:$? 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash6.right: -------------------------------------------------------------------------------- 1 | Expected Actual 2 | a*z : a*z 3 | z : z 4 | a1z a2z: a1z a2z 5 | z : z 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_bash_repl_empty_var.tests: -------------------------------------------------------------------------------- 1 | unset v 2 | echo ${v/*/w} 3 | v='' 4 | echo ${v/*/w} 5 | echo Ok:$? 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-bugs/export_exp.right: -------------------------------------------------------------------------------- 1 | aa0 bb0 2 | a=aa0 b=bb0 3 | aa1 bb1 4 | a=aa1 b=bb1 5 | zzz=zzz 6 | zz=* 7 | Done 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/continue2.tests: -------------------------------------------------------------------------------- 1 | e='' 2 | (while test $e && exit 1; true; do e=1; continue; done) 3 | echo Ok:$? 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/set-n1.tests: -------------------------------------------------------------------------------- 1 | $THIS_SH -c "echo 'set -n stops in -c?'; set -n; echo NO" && echo YES 2 | echo Ok:$? 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/escape5.right: -------------------------------------------------------------------------------- 1 | a\nb\nc\n 2 | a 3 | b 4 | c 5 | a\nb\nc\n 6 | a 7 | b 8 | c 9 | Done 10 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/noeol2.tests: -------------------------------------------------------------------------------- 1 | # last line has no EOL! 2 | if true 3 | then 4 | echo 1 5 | else 6 | echo 2 7 | fi -------------------------------------------------------------------------------- /shell/hush_test/hush-psubst/tick2.tests: -------------------------------------------------------------------------------- 1 | if false; then 2 | echo "FOO" 3 | tmp=`echo BAR >&2` 4 | fi 5 | echo BAZ 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/negative_arith.right: -------------------------------------------------------------------------------- 1 | tempfile0.tmp tempfile9.tmp 2 | tempfile0.tmp tempfile1.tmp tempfile9.tmp 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/catch.right: -------------------------------------------------------------------------------- 1 | sending USR2 2 | caught 3 | sending USR2 4 | sending USR2 5 | User defined signal 2 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal6.tests: -------------------------------------------------------------------------------- 1 | { trap "echo got TERM" TERM; sleep 3; }& sleep 1; kill $!; wait 2 | echo Done: $? 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/strops3.right: -------------------------------------------------------------------------------- 1 | 1:YES:0 2 | 2:YES:0 3 | 3:no:1 4 | 4:YES:0 5 | 2u:YES:0 6 | 3u:YES:0 7 | 4u:YES:0 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var6.right: -------------------------------------------------------------------------------- 1 | hush: syntax error: unterminated ${name} 2 | hush: syntax error: unterminated ${name} 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_10.tests: -------------------------------------------------------------------------------- 1 | set -- : 2 3 4 5 6 7 8 9 ten eleven 2 | echo Zero$10 3 | echo One$11 4 | echo Done:$? 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash_repl_empty_var.tests: -------------------------------------------------------------------------------- 1 | unset v 2 | echo ${v/*/w} 3 | v='' 4 | echo ${v/*/w} 5 | echo Ok:$? 6 | -------------------------------------------------------------------------------- /testsuite/bc_strings_results.txt: -------------------------------------------------------------------------------- 1 | stringanother stringyet 2 | another 3 | stringnoescapes\nnewline 4 | stringnewline 5 | \\ 6 | -------------------------------------------------------------------------------- /testsuite/bunzip2/bunzip2-reads-from-standard-input: -------------------------------------------------------------------------------- 1 | echo foo | bzip2 | busybox bunzip2 > output 2 | echo foo | cmp - output 3 | -------------------------------------------------------------------------------- /testsuite/cp/cp-copies-large-file: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=foo seek=10k count=1 2>/dev/null 2 | busybox cp foo bar 3 | cmp foo bar 4 | -------------------------------------------------------------------------------- /testsuite/cp/cp-dir-existing-dir: -------------------------------------------------------------------------------- 1 | mkdir bar 2 | touch bar/baz 3 | mkdir foo 4 | busybox cp -R bar foo 5 | test -f foo/bar/baz 6 | -------------------------------------------------------------------------------- /testsuite/dcx_vars_results.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -928076157.3971997652 3 | 0 4 | 928673627.1815402348 5 | 0 6 | 928673627.1815402348 7 | -------------------------------------------------------------------------------- /testsuite/find/find-supports-minus-xdev: -------------------------------------------------------------------------------- 1 | # FEATURE: CONFIG_FEATURE_FIND_XDEV 2 | 3 | busybox find . -xdev >/dev/null 2>&1 4 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-unreadable-files: -------------------------------------------------------------------------------- 1 | touch foo 2 | chmod a-r foo 3 | busybox mv foo bar 4 | test ! -e foo 5 | test -f bar 6 | -------------------------------------------------------------------------------- /testsuite/sha3sum.tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ./md5sum.tests sha3sum 11659f09370139f8ef384f4a6260947fafa6e4fcd87a1ef3f35410e9 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_huge.right: -------------------------------------------------------------------------------- 1 | 546ed3f5c81c780d3ab86ada14824237 - 2 | 546ed3f5c81c780d3ab86ada14824237 - 3 | End 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func4.tests: -------------------------------------------------------------------------------- 1 | func() { 2 | eval "echo \"\${val_${1}}\"" 3 | } 4 | 5 | val_x=24 6 | (func x) 7 | echo Done 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func5.tests: -------------------------------------------------------------------------------- 1 | f() { echo $1; } 2 | f 1 3 | 4 | f() ( echo $1; ) 5 | f 2 6 | 7 | f() ( echo $1 ) 8 | f 3 9 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_local1.tests: -------------------------------------------------------------------------------- 1 | export z=z 2 | f() { local z=a; env | grep ^z; } 3 | f 4 | env | grep ^z 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/brace2.tests: -------------------------------------------------------------------------------- 1 | v='{q,w}' 2 | # Should not brace-expand v value 3 | echo $v 4 | echo "$v" 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-psubst/tick_huge.right: -------------------------------------------------------------------------------- 1 | 546ed3f5c81c780d3ab86ada14824237 - 2 | 546ed3f5c81c780d3ab86ada14824237 - 3 | End 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_to_bad_fd.tests: -------------------------------------------------------------------------------- 1 | # ash uses fd 10 (usually) for reading the script 2 | echo LOST >&10 3 | echo OK 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_to_bad_fd3.tests: -------------------------------------------------------------------------------- 1 | # ash uses fd 10 (usually) for reading the script 2 | echo LOST >&3 3 | echo OK 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal4.tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | trap "echo Trapped" BADNAME TERM; echo $? 4 | kill $$ 5 | echo Ok 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_LINENO2.right: -------------------------------------------------------------------------------- 1 | Start LINENO=6, calling function 2 | In function: LINENO=4 3 | After function: LINENO=8 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc2.tests: -------------------------------------------------------------------------------- 1 | foo () { 2 | cat <&10 3 | echo OK 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_to_bad_fd3.tests: -------------------------------------------------------------------------------- 1 | # ash uses fd 10 (usually) for reading the script 2 | echo LOST >&3 3 | echo OK 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-signals/signal4.tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | trap "echo Trapped" BADNAME TERM; echo $? 4 | kill $$ 5 | echo Ok 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_bash6.right: -------------------------------------------------------------------------------- 1 | Expected Actual 2 | a*z : a*z 3 | z : z 4 | a1z a2z: a1z a2z 5 | z : z 6 | -------------------------------------------------------------------------------- /testsuite/bunzip2/bunzip2-removes-compressed-file: -------------------------------------------------------------------------------- 1 | echo foo | bzip2 >foo.bz2 2 | busybox bunzip2 foo.bz2 3 | test ! -f foo.bz2 4 | -------------------------------------------------------------------------------- /testsuite/bzcat/bzcat-does-not-remove-compressed-file: -------------------------------------------------------------------------------- 1 | echo foo | bzip2 >foo.bz2 2 | busybox bzcat foo.bz2 3 | test -f foo.bz2 4 | -------------------------------------------------------------------------------- /testsuite/date/date-u-works: -------------------------------------------------------------------------------- 1 | test x"Sat Jan 1 11:22:33 UTC 2000" = x"`TZ=CET-1CEST-2 busybox date -u -d 2000.01.01-11:22:33`" 2 | -------------------------------------------------------------------------------- /testsuite/echo/echo-prints-dash: -------------------------------------------------------------------------------- 1 | # FEATURE: CONFIG_DESKTOP 2 | test "`busybox echo - | od -t x1 | head -n 1`" = "0000000 2d 0a" 3 | -------------------------------------------------------------------------------- /testsuite/hostname/hostname-d-works: -------------------------------------------------------------------------------- 1 | f=$(busybox hostname -f). 2 | d=$(busybox hostname -d) 3 | test x"${f#*.}" = x"$d${d:+.}" 4 | -------------------------------------------------------------------------------- /testsuite/ln/ln-creates-hard-links: -------------------------------------------------------------------------------- 1 | echo file number one > file1 2 | busybox ln file1 link1 3 | test -f file1 4 | test -f link1 5 | -------------------------------------------------------------------------------- /testsuite/tar/tar-extracts-to-standard-output: -------------------------------------------------------------------------------- 1 | echo foo > foo 2 | tar cf foo.tar foo 3 | cat foo.tar | busybox tar Ox | cmp foo - 4 | -------------------------------------------------------------------------------- /testsuite/wget/wget-handles-empty-path: -------------------------------------------------------------------------------- 1 | test x"$SKIP_INTERNET_TESTS" != x"" && exit 2 | 3 | busybox wget http://www.google.com 4 | -------------------------------------------------------------------------------- /testsuite/which/which-uses-default-path: -------------------------------------------------------------------------------- 1 | BUSYBOX=$(command -v busybox) 2 | SAVED_PATH=$PATH 3 | unset PATH 4 | $BUSYBOX which ls 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/break5.right: -------------------------------------------------------------------------------- 1 | A 2 | B 3 | 0 4 | A:a 5 | B 6 | D 7 | A:b 8 | B 9 | D 10 | A:c 11 | B 12 | D 13 | 0 14 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/eval2.tests: -------------------------------------------------------------------------------- 1 | false; eval; echo Zero:$? 2 | false; eval ""; echo Zero:$? 3 | false; eval " 4 | "; echo Zero:$? 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/for_with_bslashes.right: -------------------------------------------------------------------------------- 1 | a 2 | b\c 3 | b\\c 4 | b"c 5 | b'c 6 | b$c 7 | b`true`c 8 | b#c 9 | Zero:0 10 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_args1.right: -------------------------------------------------------------------------------- 1 | params: a b c 2 | 'f 1 2 3' called 3 | params: a b c 4 | 'f 1 2 3' called 5 | params: a b c 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir5.right: -------------------------------------------------------------------------------- 1 | Backgrounded pipes shall have their stdin redirected to /dev/null 2 | Zero:0 3 | Zero:0 4 | Done 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-redir/redir_to_bad_fd255.tests: -------------------------------------------------------------------------------- 1 | # ash uses fd 10 (usually) for reading the script 2 | echo LOST >&255 3 | echo OK 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-signals/signal4.right: -------------------------------------------------------------------------------- 1 | ./signal4.tests: trap: line 3: BADNAME: invalid signal specification 2 | 1 3 | Trapped 4 | Ok 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/param_expand_alt2.tests: -------------------------------------------------------------------------------- 1 | echo Unquoted: H${$+ 2 | }H 3 | 4 | echo Quoted: "H${$+ 5 | }H" 6 | 7 | echo Ok:$? 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.tests: -------------------------------------------------------------------------------- 1 | a=/b/c/* 2 | b=\\ 3 | echo ${a%$b*} 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-utf8-length.tests: -------------------------------------------------------------------------------- 1 | LANG=en_US.UTF-8 2 | LC_ALL=en_US.UTF-8 3 | X=abcdÉfghÍjklmnÓpqrstÚvwcyz 4 | echo ${#X} 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var3.tests: -------------------------------------------------------------------------------- 1 | x=0; f() { local x=1; echo $x; local x; echo $x; unset x; echo $x; local x; echo $x; }; f; echo $x 2 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var6.right: -------------------------------------------------------------------------------- 1 | SHELL: line 0: syntax error: bad substitution 2 | SHELL: line 0: syntax error: bad substitution 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-glob/bash_brace1.right: -------------------------------------------------------------------------------- 1 | bash_brace1.tests 2 | *{b,b}race1.t* 3 | bash_brace1.tests bash_brace1.tests 4 | Done: 0 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc_huge.right: -------------------------------------------------------------------------------- 1 | 546ed3f5c81c780d3ab86ada14824237 - 2 | 546ed3f5c81c780d3ab86ada14824237 - 3 | End 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/break5.right: -------------------------------------------------------------------------------- 1 | A 2 | B 3 | 0 4 | A:a 5 | B 6 | D 7 | A:b 8 | B 9 | D 10 | A:c 11 | B 12 | D 13 | 0 14 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/eval2.tests: -------------------------------------------------------------------------------- 1 | false; eval; echo Zero:$? 2 | false; eval ""; echo Zero:$? 3 | false; eval " 4 | "; echo Zero:$? 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exitcode_ENOENT.right: -------------------------------------------------------------------------------- 1 | hush: can't execute './does_not_exist_for_sure': No such file or directory 2 | 127 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func4.tests: -------------------------------------------------------------------------------- 1 | func() { 2 | eval "echo \"\${val_${1}}\"" 3 | } 4 | 5 | val_x=24 6 | (func x) 7 | echo Done 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_args1.right: -------------------------------------------------------------------------------- 1 | params: a b c 2 | 'f 1 2 3' called 3 | params: a b c 4 | 'f 1 2 3' called 5 | params: a b c 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_local1.tests: -------------------------------------------------------------------------------- 1 | export z=z 2 | f() { local z=a; env | grep ^z; } 3 | f 4 | env | grep ^z 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir_to_bad_fd255.tests: -------------------------------------------------------------------------------- 1 | # ash uses fd 10 (usually) for reading the script 2 | echo LOST >&255 3 | echo OK 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/strops1.right: -------------------------------------------------------------------------------- 1 | 1:YES:0 2 | 2:YES:0 3 | 3:YES:0 4 | 4:YES:0 5 | 5:YES:0 6 | 6:YES:0 7 | 7:YES:0 8 | 8:no:1 9 | -------------------------------------------------------------------------------- /shell/hush_test/hush-test2/strops4.tests: -------------------------------------------------------------------------------- 1 | # < > are not redirect operators 2 | [[ a > b ]]; echo 1:no:$? 3 | [[ a < b ]]; echo 2:YES:$? 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/param_expand_alt2.tests: -------------------------------------------------------------------------------- 1 | echo Unquoted: H${$+ 2 | }H 3 | 4 | echo Quoted: "H${$+ 5 | }H" 6 | 7 | echo Ok:$? 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_LINENO2.right: -------------------------------------------------------------------------------- 1 | Start LINENO=6, calling function 2 | In function: LINENO=4 3 | After function: LINENO=8 4 | -------------------------------------------------------------------------------- /testsuite/cp/cp-preserves-links: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln -s foo bar 3 | busybox cp -d bar baz 4 | test -L baz 5 | test xfoo = x`readlink baz` 6 | -------------------------------------------------------------------------------- /testsuite/echo/echo-does-not-print-newline: -------------------------------------------------------------------------------- 1 | # FEATURE: CONFIG_FEATURE_FANCY_ECHO 2 | 3 | test `busybox echo -n word | wc -c` -eq 4 4 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-symlinks: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln -s foo bar 3 | busybox mv bar baz 4 | test -f foo 5 | test ! -e bar 6 | test -L baz 7 | -------------------------------------------------------------------------------- /testsuite/mv/mv-preserves-links: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln -s foo bar 3 | busybox mv bar baz 4 | test -L baz 5 | test xfoo = x`readlink baz` 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-arith/arith-bash1.tests: -------------------------------------------------------------------------------- 1 | # checks for [[ ]] 2 | 3 | # && and || 4 | [[ a && "" ]]; echo $? 5 | [[ a || "" ]]; echo $? 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/exit1.tests: -------------------------------------------------------------------------------- 1 | trap "echo Not shown" EXIT 2 | (exit) # must be silent 3 | trap "echo Once; exit" EXIT 4 | { exit; } 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_local2.right: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 1 4 | 2 5 | 1 6 | 1 7 | 2 8 | 2 9 | 3 10 | 2 11 | 2 12 | 3 13 | 1 14 | Done 15 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func_prio_over_builtins.tests: -------------------------------------------------------------------------------- 1 | true() { echo YES >&2; } 2 | true 3 | true | true 4 | (true) 5 | echo Ok:`true 2>&1` 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/while4.tests: -------------------------------------------------------------------------------- 1 | false 2 | while false && echo Not reached; do 3 | echo BUG 4 | break 5 | done 6 | echo Ok:$? 7 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/starquoted.right: -------------------------------------------------------------------------------- 1 | .1 abc d e f. 2 | .1. 3 | .abc. 4 | .d e f. 5 | .-1 abc d e f-. 6 | .-1. 7 | .abc. 8 | .d e f-. 9 | -------------------------------------------------------------------------------- /shell/ash_test/ash-quoting/bkslash_case1.right: -------------------------------------------------------------------------------- 1 | ok1 2 | ok2 3 | ok3 4 | ok4 5 | ok5 6 | Ok:0 7 | ok6 8 | ok7 9 | ok8 10 | Ok:0 11 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var-do-not-collapse-arithmetic-expansion-at-parse-time.tests: -------------------------------------------------------------------------------- 1 | unset a 2 | echo $((3 + ${a:=$((4 + 5))})) 3 | echo $a 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_leak.right: -------------------------------------------------------------------------------- 1 | should be empty: '' 2 | should be empty: '' 3 | should be not empty: 'val2' 4 | should be empty: '' 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/exit1.tests: -------------------------------------------------------------------------------- 1 | trap "echo Not shown" EXIT 2 | (exit) # must be silent 3 | trap "echo Once; exit" EXIT 4 | { exit; } 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/for_with_bslashes.right: -------------------------------------------------------------------------------- 1 | a 2 | b\c 3 | b\\c 4 | b"c 5 | b'c 6 | b$c 7 | b`true`c 8 | b#c 9 | Zero:0 10 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/while4.tests: -------------------------------------------------------------------------------- 1 | false 2 | while false && echo Not reached; do 3 | echo BUG 4 | break 5 | done 6 | echo Ok:$? 7 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/groups_and_keywords2.right: -------------------------------------------------------------------------------- 1 | hush: syntax error: unexpected ) 2 | Fail:2 3 | hush: syntax error: unexpected ) 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-quoting/bkslash_case1.right: -------------------------------------------------------------------------------- 1 | ok1 2 | ok2 3 | ok3 4 | ok4 5 | ok5 6 | Ok:0 7 | ok6 8 | ok7 9 | ok8 10 | Ok:0 11 | -------------------------------------------------------------------------------- /shell/hush_test/hush-redir/redir5.right: -------------------------------------------------------------------------------- 1 | Backgrounded pipes shall have their stdin redirected to /dev/null 2 | Zero:0 3 | Zero:0 4 | Done 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/readonly2.right: -------------------------------------------------------------------------------- 1 | hush: a=Z: readonly variable 2 | Visible:42 3 | 4 | hush: a=Z: readonly variable 5 | Visible:42 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-do-not-quote-backslashes-in-parameter-expansions-outside-quotes.tests: -------------------------------------------------------------------------------- 1 | a=/b/c/* 2 | b=\\ 3 | echo ${a%$b*} 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-utf8-length.tests: -------------------------------------------------------------------------------- 1 | LANG=en_US.UTF-8 2 | LC_ALL=en_US.UTF-8 3 | X=abcdÉfghÍjklmnÓpqrstÚvwcyz 4 | echo ${#X} 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var3.tests: -------------------------------------------------------------------------------- 1 | x=0; f() { local x=1; echo $x; local x; echo $x; unset x; echo $x; local x; echo $x; }; f; echo $x 2 | -------------------------------------------------------------------------------- /testsuite/bc_arrays.bc: -------------------------------------------------------------------------------- 1 | a[0] = 1 2 | a[2-1] = 2 3 | 4 | a[0]+a[0] 5 | 6 | a[2-1]+a[2-1] 7 | 8 | a[5] = 2 9 | a[5.789] 10 | 11 | -------------------------------------------------------------------------------- /testsuite/cp/cp-a-preserves-links: -------------------------------------------------------------------------------- 1 | touch foo 2 | ln -s foo bar 3 | busybox cp -a bar baz 4 | test -L baz 5 | test xfoo = x`readlink baz` 6 | -------------------------------------------------------------------------------- /testsuite/sha256sum.tests: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . ./md5sum.tests sha256sum 8e1d3ed57ebc130f0f72508446559eeae06451ae6d61b1e8ce46370cfb8963c3 4 | -------------------------------------------------------------------------------- /testsuite/tar/tar-extracts-from-standard-input: -------------------------------------------------------------------------------- 1 | touch foo 2 | tar cf foo.tar foo 3 | rm foo 4 | cat foo.tar | busybox tar x 5 | test -f foo 6 | -------------------------------------------------------------------------------- /examples/bootfloppy/etc/inittab: -------------------------------------------------------------------------------- 1 | ::sysinit:/etc/init.d/rcS 2 | ::respawn:-/bin/sh 3 | tty2::askfirst:-/bin/sh 4 | ::ctrlaltdel:/bin/umount -a -r 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment3.tests: -------------------------------------------------------------------------------- 1 | # This must be interpreted as assignments 2 | a=1 b\ 3 | =2 c=3 4 | echo Done:$? 5 | echo abc=$a$b$c 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/func1.right: -------------------------------------------------------------------------------- 1 | Hello 2 | Zero: 0 3 | One: 1 Param1: World 4 | Zero: 0 Param1: Restored 5 | Multi line function 6 | One: 1 7 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/opts1.tests: -------------------------------------------------------------------------------- 1 | if test $# = 0; then 2 | exec "$THIS_SH" $0 -10qwertyuiop 3 | fi 4 | echo "Param1: >$1<" 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_LINENO3.tests: -------------------------------------------------------------------------------- 1 | $THIS_SH -c 'echo "LINENO starts from $LINENO in -c" 2 | echo "and increments on next line: $LINENO"' 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-vars/var_nested2.tests: -------------------------------------------------------------------------------- 1 | # the bug was easier to trigger in one-liner form 2 | a=a; b=b; f() { a=A; b=B; }; a= f; echo $a$b 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/assignment3.tests: -------------------------------------------------------------------------------- 1 | # This must be interpreted as assignments 2 | a=1 b\ 3 | =2 c=3 4 | echo Done:$? 5 | echo abc=$a$b$c 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func1.right: -------------------------------------------------------------------------------- 1 | Hello 2 | Zero: 0 3 | One: 1 Param1: World 4 | Zero: 0 Param1: Restored 5 | Multi line function 6 | One: 1 7 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_local2.right: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 1 4 | 2 5 | 1 6 | 1 7 | 2 8 | 2 9 | 3 10 | 2 11 | 2 12 | 3 13 | 1 14 | Done 15 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/func_prio_over_builtins.tests: -------------------------------------------------------------------------------- 1 | true() { echo YES >&2; } 2 | true 3 | true | true 4 | (true) 5 | echo Ok:`true 2>&1` 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/opts1.tests: -------------------------------------------------------------------------------- 1 | if test $# = 0; then 2 | exec "$THIS_SH" $0 -10qwertyuiop 3 | fi 4 | echo "Param1: >$1<" 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/tickquote1.tests: -------------------------------------------------------------------------------- 1 | # UNFIXED BUG: hush does not parse embedded `cmd` at embedding document parse time 2 | echo _`"pwd`_ 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/starquoted.right: -------------------------------------------------------------------------------- 1 | .1 abc d e f. 2 | .1. 3 | .abc. 4 | .d e f. 5 | .-1 abc d e f-. 6 | .-1. 7 | .abc. 8 | .d e f-. 9 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var-do-not-collapse-arithmetic-expansion-at-parse-time.tests: -------------------------------------------------------------------------------- 1 | unset a 2 | echo $((3 + ${a:=$((4 + 5))})) 3 | echo $a 4 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_nested2.tests: -------------------------------------------------------------------------------- 1 | # the bug was easier to trigger in one-liner form 2 | a=a; b=b; f() { a=A; b=B; }; a= f; echo $a$b 3 | -------------------------------------------------------------------------------- /testsuite/mv/mv-moves-large-file: -------------------------------------------------------------------------------- 1 | dd if=/dev/zero of=foo seek=10k count=1 2>/dev/null 2 | busybox mv foo bar 3 | test ! -e foo 4 | test -f bar 5 | -------------------------------------------------------------------------------- /testsuite/tee/tee-tees-input: -------------------------------------------------------------------------------- 1 | echo i\'m a little teapot >foo 2 | echo i\'m a little teapot | busybox tee bar >baz 3 | cmp foo bar && cmp foo baz 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc_bkslash_newline1.right: -------------------------------------------------------------------------------- 1 | heredoc0 2 | Ok0:0 3 | heredoc1 4 | Ok1:0 5 | heredoc2 6 | Ok2:0 7 | heredoc3 8 | Ok4:0 9 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/control_char3.tests: -------------------------------------------------------------------------------- 1 | # (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages) 2 | $THIS_SH -c '\' SHELL 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/source1.tests: -------------------------------------------------------------------------------- 1 | echo "echo Sourced ok" >../sourced.sh 2 | PATH="..:$PATH" 3 | . sourced.sh 4 | rm ../sourced.sh 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-parsing/escape5.tests: -------------------------------------------------------------------------------- 1 | v="a\nb\nc\n" 2 | echo "$v" 3 | printf "$v" 4 | v='a\nb\nc\n' 5 | echo "$v" 6 | printf "$v" 7 | echo Done 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_SIGCHLD.tests: -------------------------------------------------------------------------------- 1 | x=BAD 2 | { sleep 0.4; echo Ok; } | { sleep 0.2 & read x; echo "x='$x'"; } 3 | echo "exitcode:$?" 4 | 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-read/read_r.tests: -------------------------------------------------------------------------------- 1 | echo 'test\ 2 | best' | (read reply; echo "$reply") 3 | echo 'test\ 4 | best' | (read -r reply; echo "$reply") 5 | -------------------------------------------------------------------------------- /shell/ash_test/ash-standalone/noexec_gets_no_env.tests: -------------------------------------------------------------------------------- 1 | export VAR7=VAL 2 | env | grep ^VAR7= 3 | echo $? 4 | VAR8=VAL env | grep ^VAR8= 5 | echo $? 6 | -------------------------------------------------------------------------------- /shell/ash_test/ash-standalone/nofork_env.right: -------------------------------------------------------------------------------- 1 | ZVAR=1 2 | ZVAR=2 3 | ZVAR=3 4 | ZVAR=4 5 | ZVAR=5 6 | ZVAR=6 7 | ZVAR=7 8 | ZVAR=8 9 | Ok:0 10 | -------------------------------------------------------------------------------- /shell/hush_test/hush-heredoc/heredoc_bkslash_newline1.right: -------------------------------------------------------------------------------- 1 | heredoc0 2 | Ok0:0 3 | heredoc1 4 | Ok1:0 5 | heredoc2 6 | Ok2:0 7 | heredoc3 8 | Ok4:0 9 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/control_char3.tests: -------------------------------------------------------------------------------- 1 | # (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages) 2 | $THIS_SH -c '\' SHELL 3 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/source1.tests: -------------------------------------------------------------------------------- 1 | echo "echo Sourced ok" >../sourced.sh 2 | PATH="..:$PATH" 3 | . sourced.sh 4 | rm ../sourced.sh 5 | echo Done 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-misc/source4.right: -------------------------------------------------------------------------------- 1 | hush: syntax error: unterminated ${name} 2 | line2 3 | Ok1:0 4 | hush: syntax error: unterminated ' 5 | Ok2:1 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-parsing/escape5.tests: -------------------------------------------------------------------------------- 1 | v="a\nb\nc\n" 2 | echo "$v" 3 | printf "$v" 4 | v='a\nb\nc\n' 5 | echo "$v" 6 | printf "$v" 7 | echo Done 8 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_SIGCHLD.tests: -------------------------------------------------------------------------------- 1 | x=BAD 2 | { sleep 0.4; echo Ok; } | { sleep 0.2 & read x; echo "x='$x'"; } 3 | echo "exitcode:$?" 4 | 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-read/read_r.tests: -------------------------------------------------------------------------------- 1 | echo 'test\ 2 | best' | (read reply; echo "$reply") 3 | echo 'test\ 4 | best' | (read -r reply; echo "$reply") 5 | -------------------------------------------------------------------------------- /shell/hush_test/hush-standalone/noexec_gets_no_env.tests: -------------------------------------------------------------------------------- 1 | export VAR7=VAL 2 | env | grep ^VAR7= 3 | echo $? 4 | VAR8=VAL env | grep ^VAR8= 5 | echo $? 6 | -------------------------------------------------------------------------------- /shell/hush_test/hush-vars/var_LINENO3.tests: -------------------------------------------------------------------------------- 1 | $THIS_SH -c 'echo "LINENO starts from $LINENO in -c" 2 | echo "and increments on next line: $LINENO"' 3 | -------------------------------------------------------------------------------- /testsuite/echo/echo-prints-non-opts: -------------------------------------------------------------------------------- 1 | # FEATURE: CONFIG_DESKTOP 2 | test "`busybox echo -neEZ | od -t x1 | head -n 1`" = "0000000 2d 6e 65 45 5a 0a" 3 | -------------------------------------------------------------------------------- /testsuite/ln/ln-creates-soft-links: -------------------------------------------------------------------------------- 1 | echo file number one > file1 2 | busybox ln -s file1 link1 3 | test -L link1 4 | test xfile1 = x`readlink link1` 5 | -------------------------------------------------------------------------------- /examples/var_service/getty_tty1/alt08x16+unimap.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/r0-zero/busybox/master/examples/var_service/getty_tty1/alt08x16+unimap.fnt -------------------------------------------------------------------------------- /printutils/Kbuild.src: -------------------------------------------------------------------------------- 1 | # Makefile for busybox 2 | # 3 | # Licensed under GPLv2, see file LICENSE in this source tree. 4 | 5 | lib-y := 6 | 7 | INSERT 8 | -------------------------------------------------------------------------------- /shell/ash_test/ash-heredoc/heredoc1.tests: -------------------------------------------------------------------------------- 1 | cat <<000; cat </dev/null)" = "I W" 4 | -------------------------------------------------------------------------------- /testsuite/touch/touch-touches-files-after-non-existent-file: -------------------------------------------------------------------------------- 1 | touch -t 198001010000 bar 2 | busybox touch -c foo bar 3 | test x"`find bar -mtime -1`" = xbar 4 | -------------------------------------------------------------------------------- /testsuite/wc/wc-counts-all: -------------------------------------------------------------------------------- 1 | # 1 line, 4 words, 20 chars. 2 | test "`echo i\'m a little teapot | busybox wc | sed 's/ */ /g' | sed 's/^ //'`" = '1 4 20' 3 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment1.right: -------------------------------------------------------------------------------- 1 | if1:0 2 | while1:0 3 | until1:0 4 | if2:0 5 | while2:0 6 | until2:0 7 | if3:0 8 | while3:0 9 | until3:0 10 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/assignment4.tests: -------------------------------------------------------------------------------- 1 | # There was a bug where we misinterpreted assignments after 'do': 2 | for i in 1; do eval b=; done 3 | echo Done:$? 4 | -------------------------------------------------------------------------------- /shell/ash_test/ash-misc/compound.right: -------------------------------------------------------------------------------- 1 | new group 2 | 0 3 | 1 4 | 2 5 | 3 6 | 4 7 | 5 8 | 6 9 | new group 10 | new group 11 | 0 12 | 1 13 | 2 14 | 3 15 | --------------------------------------------------------------------------------