¿ªÔÆÌåÓý

Re: Package Installation Scripts


 

On Thu, 25 Jun 2020 08:07:58 +1000, "Ray Wells" <vk2tv@...>
wrote:



On 25/6/20 2:32 am, Larry Dighera wrote:
On Mon, 22 Jun 2020 11:12:56 -0500, "John Nicholas"
<stnick@...> wrote:

So when I decide to add an app to my collection. Do I add it via the etcher to the download, or onto the SD Card, or download after everything is up and running
Hello John,

<snip>

The first is 'apt.sh' which I run to see if there are any updates
available, before actually downloading a package:

-----------------------------------------------------------------------
<more_snip>
-----------------------------------------------------------------------

Between the effects of word-wrap and Windows Carriage-return,
Line-feed convention to end lines, the above will require some editing
to use. The attachments won't have those issues.
The tool dos2unix is handy for massaging a Windows generated text file
into Unix (Linux) format, it strips the CR that can cause a script to fail.

sudo apt-get install dos2unix

Ray vk2tv
Ray,

Thanks for the information about 'dos2unix'. I wasn't aware of that
package. From the information here:
it appears to be quite a versatile tool.

Features:
* Native language support: Brazilian Portuguese, Chinese
simplified, Chinese traditional, Danish, Dutch, English, Esperanto,
French, German, Hungarian, Japanese, Norwegian Bokmaal, Polish,
Russian, Serbian, Spanish, Swedish, Ukrainian, Vietnamese.
* Automatically skips binary and non-regular files
* In-place, paired, or stdio mode conversion.
* Keep original file dates option.
* 7-bit and iso conversion modes like SunOS dos2unix.
* Conversion of Unicode UTF-16 files.
* Handles Unicode Byte Order Mark (BOM)
* Display file information
* Secure


I just use this little script to strip out carriage return characters
and the Windows/DOS End Of File Crtl-Z characters from Windows text
files on a Linux/Unix system:

-----------------------------------------------------------------------
# nocr
# This script will strip carriage-return characters from its
argument.
#
# LGD: Mon 25 Jul 07:39:53 PDT 2016
# LGS: Mon 16 Mar 2020 01:13:27 PM PDT Added ^Z character
deletion
#

case $# in
0)echo -e "\n$0: Usage: $0 [filename]" ;;
1) cat $1 | tr -d "\r\032" > ${1}.nocr ;;
*)echo -e "$0 accepts a single filename command-line argument:
[filename]\n" ;;
esac
-----------------------------------------------------------------------

Best regards,
Larry
WB6BBB

Join [email protected] to automatically receive all group messages.