if..else..fi allows to make choice based on the success or failure of a command. For example, find out if file exists (true condition) or not (false condition) and take action based on a condition result.if test var -eq val then command executed successfully execute all commands up to else statement or to fi if there is no else statement else if command failed then execute all commands up to fi fi
his tutorial demonstrates how to build and debug a simple Raspberry PI application using Visual Studio. The same steps will also work with Raspberry Pi 2.
#!/bin/sh FILE="/path/to/file" /bin/cat <<EOM >$FILE text1 text2 text3 text4 EOM
If you want to write directly the command is
$ echo 'Hello World' > file
sudo apt-get remove xrdp
5 Ways to Copy Data From a Raspberry Pi to a PC
Transfer Files Using PuTTY