My end goal is to read some weather information from a text or xml file, extract the temperature and write it on an image file using convert. I am trying to take it one step at a time learn a little and improve on my bash scrip.
I am able to access the file I created using this code that saves into the file every word inputted from EditTExt in Android. However, after inputting more words the only the last word was written on the file. It seems that the previous words was overwritten after pressing the SAVE button. This button is clicked each time a word is to be saved in the text file.
cat $@ | while read line
for word in $line
echo $word | circling-the-square
# here's where i need to add the if statement:
#if the word contains one of the four [!?.,],
#then also echo that punctuation mark
circling-the-square is a Python script based on Norvig's spelling corrector.
My bash script needs to read the variables from a text file that contains hundreds of variables, most of which conform to standard bash variable sytax (e.g., VAR1=VALUE1). However, a few lines in this file can be problematic and I hope to find a simple solution to reading them into bash.
I have been using a program on windows called AutoKey.
My environment at work is Linux and I have been experimenting with expect. Very powerful. I can move my AutoKey scripts to Linux using Expect once I am educated on how to read from a file using Expect.
My application would be as follows:
1. I have a list of MAC addresses in a text file format aa:bb:cc:dd:ee:ff.