summaryrefslogtreecommitdiff
path: root/convert_to_seq.sh
diff options
context:
space:
mode:
Diffstat (limited to 'convert_to_seq.sh')
-rw-r--r--convert_to_seq.sh/convert_to_seq.sh5
-rw-r--r--convert_to_seq.sh/description1
2 files changed, 6 insertions, 0 deletions
diff --git a/convert_to_seq.sh/convert_to_seq.sh b/convert_to_seq.sh/convert_to_seq.sh
new file mode 100644
index 0000000..5e92ff7
--- /dev/null
+++ b/convert_to_seq.sh/convert_to_seq.sh
@@ -0,0 +1,5 @@
+convert_to_seq() {
+ printf "${@}" | xargs -n1 -d',' | tr '-' ' ' | awk 'NF == 2 { system("/bin/seq "$1" "$2); } NF != 2 { print $1; }' | xargs
+}
+
+convert_to_seq "$1" \ No newline at end of file
diff --git a/convert_to_seq.sh/description b/convert_to_seq.sh/description
new file mode 100644
index 0000000..10e1ab8
--- /dev/null
+++ b/convert_to_seq.sh/description
@@ -0,0 +1 @@
+Convert input sets of numbers into numerical sequences \ No newline at end of file
bgstack15