You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: assorted-text-processing-tools.html
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -543,6 +543,17 @@
543
543
tea
544
544
545
545
$ rm xx0?
546
+
</code></pre><p><strong>21)</strong> Write a generic solution that transposes comma delimited data. Example input/output is shown below. You can use any tool(s) presented in this book.<pre><codeclass=language-bash>$ cat scores.csv
</code></pre><p><strong>21)</strong> Write a shell script named <code>read_file.sh</code> that reads a file line by line to be passed as argument to the <code>paste -sd,</code> command. Can you also write a solution using the <code>xargs</code> command instead of a script?<pre><codeclass=language-bash>$ printf 'apple\nbanana\ncherry\n' > items_1.txt
</code></pre><p><strong>22)</strong> Write a function named <code>add_path</code> which prefixes the path of the current working directory to the arguments it receives and displays the results. Examples are shown below.<pre><codeclass=language-bash>$ add_path() # ???
</code></pre><p><strong>23)</strong> What do the options <code>bash -x</code> and <code>bash -v</code> do?<p><strong>24)</strong> What is <code>shellcheck</code> and when would you use it?</main><navclass=nav-wrapperaria-label="Page navigation"><arel=prevhref=assorted-text-processing-tools.htmlclass="mobile-nav-chapters previous"title="Previous chapter"aria-label="Previous chapter"aria-keyshortcuts=Left><iclass="fa fa-angle-left"></i></a><arel=nexthref=shell-customization.htmlclass="mobile-nav-chapters next"title="Next chapter"aria-label="Next chapter"aria-keyshortcuts=Right><iclass="fa fa-angle-right"></i></a><divstyle="clear: both"></div></nav></div></div><navclass=nav-wide-wrapperaria-label="Page navigation"><arel=prevhref=assorted-text-processing-tools.htmlclass="nav-chapters previous"title="Previous chapter"aria-label="Previous chapter"aria-keyshortcuts=Left><iclass="fa fa-angle-left"></i></a><arel=nexthref=shell-customization.htmlclass="nav-chapters next"title="Next chapter"aria-label="Next chapter"aria-keyshortcuts=Right><iclass="fa fa-angle-right"></i></a></nav></div><script>
0 commit comments