Skip to main content
Markup and minor mods
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k

THE ANSWER IS CURLY BRACKETS!

This is how I did it; it's not the prettiest way to skin a cat...

#!/bin/bash input=$1 output=$2 cp $input ${output}_$(date +%m%d%y)

./script /usr/tmp/file_name /usr/tmp/arch/file_name

[user]$ ls -l /usr/tmp/arch

-rw-rw-r-- 1 xxxxxx yyyyyyy 5 Sep 7 12:06 file_name_090718

#!/bin/bash
input=$1
output=$2
cp $input ${output}_$(date +%m%d%y)
$ ./script /usr/tmp/file_name /usr/tmp/arch/file_name
$ ls -l /usr/tmp/arch
-rw-rw-r-- 1 xxxxxx yyyyyyy 5 Sep  7 12:06 file_name_090718

THE ANSWER IS CURLY BRACKETS!

This is how I did it; it's not the prettiest way to skin a cat...

#!/bin/bash input=$1 output=$2 cp $input ${output}_$(date +%m%d%y)

./script /usr/tmp/file_name /usr/tmp/arch/file_name

[user]$ ls -l /usr/tmp/arch

-rw-rw-r-- 1 xxxxxx yyyyyyy 5 Sep 7 12:06 file_name_090718

THE ANSWER IS CURLY BRACKETS!

This is how I did it; it's not the prettiest way to skin a cat...

#!/bin/bash
input=$1
output=$2
cp $input ${output}_$(date +%m%d%y)
$ ./script /usr/tmp/file_name /usr/tmp/arch/file_name
$ ls -l /usr/tmp/arch
-rw-rw-r-- 1 xxxxxx yyyyyyy 5 Sep  7 12:06 file_name_090718
Source Link
Emile
  • 395
  • 1
  • 6
  • 15

THE ANSWER IS CURLY BRACKETS!

This is how I did it; it's not the prettiest way to skin a cat...

#!/bin/bash input=$1 output=$2 cp $input ${output}_$(date +%m%d%y)

./script /usr/tmp/file_name /usr/tmp/arch/file_name

[user]$ ls -l /usr/tmp/arch

-rw-rw-r-- 1 xxxxxx yyyyyyy 5 Sep 7 12:06 file_name_090718