1

I have a few scripts that I constantly enter in input as below:

[support@ccfcore-3 exporttool]$ ./sendExamToRepo.sh
Enter the Study Instance UID:
2.25.98472613238667427310842065102689842379

The script itself uses a basic echo and read statement:

echo "Enter the Study Instance UID: "
read SUID

Is there a way I can save the input I enter into a sort of text file or into a buffer so that when I need to re-enter it, I don't have to constantly go through log files to copy the input again (I get the input from log files)?

1 Answer 1

4

You can pipe it to stdin of the script:

echo 2.25.9847261 | ./sendExamToRepo.sh

Or redirect stdin to come from a file:

./sendExamToRepo.sh < SUID.txt
1
  • Perfect, the echo statement works good enough for me!! thanks
    – ryekayo
    Sep 15, 2014 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .