☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> Java, Writing To A Bash Script
Add Reply
New Topic
New Poll
Views: 714
Replies: 1
Track Topic
byoungin
Member
Posts: 2,708
Joined: Aug 14 2010
Gold
:
19.50
#1
Nov 21 2017 05:24pm
https://stackoverflow.com/questions/10810943/executing-shell-scripts-from-java-shell-scripts-having-read-operation/10811057#10811057
My problem is basically the above, except I'm trying to read from a bash file containing a user input from /dev/tty
EX:
#!/bin/bash
echo "Type the year that you want to check (4 digits), followed by [ENTER]:"
read -e year < /dev/tty
echo $year
What can I do to have this java program write input to this bash script?
bakalolo
Member
Posts: 17,809
Joined: Mar 18 2009
Gold
:
57,185.00
#2
Dec 21 2017 03:54pm
are you trying to read the actually file as in the text inside da .sh or running the script?
im guessing you have to look into process builder if latter? i did dis as an assignment but i dont remember too long bro
Go Back To
Programming & Development
Topic List
Add Reply
New Topic
New Poll
© 2003-2024 d2jsp
Contact