LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2020, 10:05 AM   #1
BudiKusasi
Member
 
Registered: Apr 2017
Distribution: Artix
Posts: 345

Rep: Reputation: 15
have bash read command's first few char. is fed by CL


Is it possible to have the bash read command's first few characters is fed into buffer by way of script code / CLI instead of interactive stdin?
 
Old 09-03-2020, 10:17 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by BudiKusasi View Post
Is it possible to have the bash read command's first few characters is fed into buffer by way of script code / CLI instead of interactive stdin?
Generally that is done by redirection (bash <script_file)... or directing bash to read a script (bash script_file).

You can also do it via a pipe from some other script/application (something | bash ...).
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fed 23 + KDE: once in few reboots desktop icons forget location kaza Fedora 2 06-20-2016 01:55 PM
[SOLVED] Bash Script Help - Need to read first few characters and make decision jaa1180 Programming 10 10-14-2013 12:05 PM
char by char read from serial port windell Programming 7 08-05-2008 09:40 PM
Upgrade Fed 6 to Fed 8 using only the *.iso ericcarlson Fedora 1 11-18-2007 02:25 AM
Copy a char* to another char* sathyan Programming 8 07-24-2003 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration