mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
deploy: e531b5c337
This commit is contained in:
parent
67e01c76b4
commit
02bed41d9a
554 changed files with 652 additions and 377 deletions
2
2938.js
Normal file
2
2938.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
"use strict";(self.webpackChunkmy_application=self.webpackChunkmy_application||[]).push([[2938],{2938:(e,n,i)=>{i.r(n),i.d(n,{default:()=>t});const t='#!/bin/bash\n# Simple line count example, using bash\n#\n# Bash tutorial: http://linuxconfig.org/Bash_scripting_Tutorial#8-2-read-file-into-bash-array\n# My scripting link: http://www.macs.hw.ac.uk/~hwloidl/docs/index.html#scripting\n#\n# Usage: ./line_count.sh file\n# -----------------------------------------------------------------------------\n\n# Link filedescriptor 10 with stdin\nexec 10<&0\n# stdin replaced with a file supplied as a first argument\nexec < $1\n# remember the name of the input file\nin=$1\n\n# init\nfile="current_line.txt"\nlet count=0\n\n# this while loop iterates over all lines of the file\nwhile read LINE\ndo\n # increase line counter\n ((count++))\n # write current line to a tmp file with name $file (not needed for counting)\n echo $LINE > $file\n # this checks the return code of echo (not needed for writing; just for demo)\n if [ $? -ne 0 ]\n then echo "Error in writing to file ${file}; check its permissions!"\n fi\ndone\n\necho "Number of lines: $count"\necho "The last line of the file is: `cat ${file}`"\n\n# Note: You can achieve the same by just using the tool wc like this\necho "Expected number of lines: `wc -l $in`"\n\n# restore stdin from filedescriptor 10\n# and close filedescriptor 10\nexec 0<&10 10<&-'}}]);
|
||||
//# sourceMappingURL=2938.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue