From f54922269049658bdd53adadd1055e15fd490fba Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Fri, 26 Mar 2021 12:58:56 +0100 Subject: Initial commit --- dup.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 dup.sh (limited to 'dup.sh') diff --git a/dup.sh b/dup.sh new file mode 100755 index 0000000..4e977f6 --- /dev/null +++ b/dup.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Duplicate a string + +NEWLINE=`printf "\n"` +IFS='' +while read -r line || [ -n "$line" ]; do + LINES="$LINES"`printf "$line"`"$NEWLINE" + #echo $line +done + +for line in "$LINES"; do + printf "$line" +done -- cgit v1.2.3