Skip to main content

Posts

Showing posts from June, 2019

28/06/2019_Week1_Friday

Downloaded Programs Vim Emacs Xmind REF :  ://coderwall.com/p/adv71w/basic-vim-commands-for-getting-started Vim commands Emacs commands

27/06/2019_Week1_Thursday

Objective is to create a bash file to read a given file and output the word count Read Lines From An File Input input="path_to_the _text_file" while IFS= read -r line do echo "$line" done < "$input" if [[ $str = *main* ]]; then echo "Yes" fi Replace a string with an substring #!/bin/bash firstString="I love Suzi and Marry" secondString="Sara" echo "${firstString/Suzi/$secondString}" # prints 'I love Sara and Marry' REF : www.tutorialkart.com/bash-shell-scripting/bash-if/#Example-1 #!/bin/bash count=0 input=~/Documents/sample-text.txt while read -r line; #reading lines in the while loop do for word in $line; #for loop to count words in a line do read -ra ARR <<< ...