Viewed k times. Kiran Kiran 1 1 gold badge 8 8 silver badges 21 21 bronze badges. Add a comment. Active Oldest Votes. Hope, someone will find this useful. Example: File: setup. Nicolai Nicolai 4, 1 1 gold badge 21 21 silver badges 31 31 bronze badges. I like this way. An improvement for your grep: Now it matches the string anywhere in the line.
Show 8 more comments. As to your question, its been asked and answered many times, for instance: unix. How to skip empty strings?
Steven the Easily Amused 8 8 silver badges 19 19 bronze badges. I like this. You can use a check like this to ignore empty lines: if [! For a very high performance, and BASH 3. Salva Salva 41 3 3 bronze badges. Please review and update me whether it is right approach or not. I like Nicolai's answer best — bakoyaro. The solution does sourcing but massages the contents before sourcing:!
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How do I read a properties file through my script?
Ask Question. Asked 4 years, 10 months ago. Active 4 years, 10 months ago. Viewed 28k times. So I have! Improve this question. MikeD 4 4 silver badges 16 16 bronze badges.
Dave Dave 1, 17 17 gold badges 40 40 silver badges 71 71 bronze badges. If you use while.. See the answers here: String replacement using a dictionary for proper ways to do it Here we discuss the introduction to Shell Script Read File, what is read file? You may also have a look at the following articles to learn more —. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy. Forgot Password?
This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy. Popular Course in this category. Course Price View Course. Free Software Development Course. Login details for this Free course will be emailed to you.
Email ID.
0コメント