Fact extraction from bash in support of script migration

I. Davis, R. Holt, R. Mraz
{"title":"Fact extraction from bash in support of script migration","authors":"I. Davis, R. Holt, R. Mraz","doi":"10.1109/CSMR-WCRE.2014.6747195","DOIUrl":null,"url":null,"abstract":"Owl Computing Technologies provides software and hardware that facilitates secure unidirectional data transfer across the Internet. Bash scripts are used to facilitate customer installation of Owl's client/server software, and to provide high level management, control, and monitoring of client/server interfaces. With the evolution of more robust scripting languages, Owl now wishes to convert their bash scripts to other scripting languages. As part of this conversion exercise the configuration and customization of their bash scripts will no longer involve direct end user modifications of the script logic. It will instead be achieved through appropriate modification of a supporting XML configuration file, which is read by each script. This avoids the risk that end users erroneously change scripts, and makes legitimate end user customization of their scripts simpler, more obvious, and easier to discern. An open source fact extractor was implemented that determines the dynamic usage made of every variable within an arbitrary bash script. This tool reports errors in a script and generates an XML configuration file that describes variable usage. Those variables whose value may not be assigned by an end user are manually removed from this XML configuration file. A second program reads this configuration file, generates the appropriate bash variable assignment statements, and these are then applied within bash by using the bash eval command. Collectively this provides a simple mechanism for altering arbitrary bash scripts so that they use an external XML configuration file, as a first step in the larger exercise of migrating bash scripts to other scripting languages.","PeriodicalId":166271,"journal":{"name":"2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE)","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-02-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CSMR-WCRE.2014.6747195","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Owl Computing Technologies provides software and hardware that facilitates secure unidirectional data transfer across the Internet. Bash scripts are used to facilitate customer installation of Owl's client/server software, and to provide high level management, control, and monitoring of client/server interfaces. With the evolution of more robust scripting languages, Owl now wishes to convert their bash scripts to other scripting languages. As part of this conversion exercise the configuration and customization of their bash scripts will no longer involve direct end user modifications of the script logic. It will instead be achieved through appropriate modification of a supporting XML configuration file, which is read by each script. This avoids the risk that end users erroneously change scripts, and makes legitimate end user customization of their scripts simpler, more obvious, and easier to discern. An open source fact extractor was implemented that determines the dynamic usage made of every variable within an arbitrary bash script. This tool reports errors in a script and generates an XML configuration file that describes variable usage. Those variables whose value may not be assigned by an end user are manually removed from this XML configuration file. A second program reads this configuration file, generates the appropriate bash variable assignment statements, and these are then applied within bash by using the bash eval command. Collectively this provides a simple mechanism for altering arbitrary bash scripts so that they use an external XML configuration file, as a first step in the larger exercise of migrating bash scripts to other scripting languages.
从bash中提取事实,支持脚本迁移
Owl Computing Technologies提供软件和硬件,促进互联网上安全的单向数据传输。Bash脚本用于帮助客户安装Owl的客户机/服务器软件,并提供对客户机/服务器接口的高级管理、控制和监视。随着更健壮的脚本语言的发展,Owl现在希望将他们的bash脚本转换为其他脚本语言。作为转换练习的一部分,bash脚本的配置和定制将不再涉及最终用户对脚本逻辑的直接修改。相反,它将通过对每个脚本读取的支持XML配置文件的适当修改来实现。这避免了最终用户错误地更改脚本的风险,并使合法的最终用户对脚本的自定义更简单、更明显、更容易识别。实现了一个开源事实提取器,它确定任意bash脚本中每个变量的动态使用情况。该工具报告脚本中的错误,并生成描述变量用法的XML配置文件。这些变量的值可能不是由最终用户分配的,这些变量将手动从这个XML配置文件中删除。第二个程序读取这个配置文件,生成适当的bash变量赋值语句,然后通过使用bash eval命令在bash中应用这些语句。总的来说,这提供了一种简单的机制,可以修改任意bash脚本,使它们使用外部XML配置文件,这是将bash脚本迁移到其他脚本语言的第一步。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信