diff --git a/Userland/Utilities/seq.cpp b/Userland/Utilities/seq.cpp index 6000e03f3d..a130f6b4b1 100644 --- a/Userland/Utilities/seq.cpp +++ b/Userland/Utilities/seq.cpp @@ -50,10 +50,12 @@ ErrorOr serenity_main(Main::Arguments arguments) TRY(Core::System::unveil(nullptr, nullptr)); StringView separator = "\n"sv; + StringView terminator = ""sv; Vector parameters; Core::ArgsParser args_parser; args_parser.add_option(separator, "Characters to print after each number (default: \\n)", "separator", 's', "separator"); + args_parser.add_option(terminator, "Characters to print at the end of the sequence", "terminator", 't', "terminator"); args_parser.add_positional_argument(parameters, "1 to 3 parameters, interpreted as LAST, FIRST LAST, or FIRST INCREMENT LAST", "parameters"); args_parser.parse(arguments); @@ -105,5 +107,8 @@ ErrorOr serenity_main(Main::Arguments arguments) d += step; } + if (!terminator.is_empty()) + out(terminator); + return 0; }