0

Perl script line:

my $resp=<STDIN>;
chomp($resp);

Im trying to convert perl script to shell script... Just got stuck with this 2 lines... Please help me...

1 Answer 1

3

Just this:

read resp

In Perl chomp function is used to remove newline from the input.
The shell removes the newline automatically.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.