Skip to main content
deleted 8 characters in body
Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access. This may not help you for your case, since rewriting a bash script in Powershell will produce a comparable effort as rewriting it in Perl or Python.

Actually, if you cannot replace the old Bash code by no means, I first would try to live with the SQLplus solution and learn as many of the gory details of how to deal with the weaknesses of that approach. SQLplus is old and mature, and there are solutions around for almost every problem you might encounter. Perhaps, if you have to add new features, you can try to use additional Perl or Python scripts and combine it with the existing shell scripts. For example, use Perl to call data from a web service and convert the data to a text format which can be processed furthermore within a bash script. And perhaps, if you show that solution to your client, you may convince him that bash scripts are not the best solution for everything.

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access. This may not help you for your case, since rewriting a bash script in Powershell will produce a comparable effort as rewriting it in Perl or Python.

Actually, if you cannot replace the old Bash code by no means, I first would try to live with the SQLplus solution and learn as many of the gory details how to deal with the weaknesses of that approach. SQLplus is old and mature, and there are solutions around for almost every problem you might encounter. Perhaps, if you have to add new features, you can try to use additional Perl or Python scripts and combine it with the existing shell scripts. For example, use Perl to call data from a web service and convert the data to a text format which can be processed furthermore within a bash script. And perhaps, if you show that solution to your client, you may convince him that bash scripts are not the best solution for everything.

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access. This may not help you for your case, since rewriting a bash script in Powershell will produce a comparable effort as rewriting it in Perl or Python.

Actually, if you cannot replace the old Bash code by no means, I first would try to live with the SQLplus solution and learn the gory details of how to deal with the weaknesses of that approach. SQLplus is old and mature, and there are solutions around for almost every problem you might encounter. Perhaps, if you have to add new features, you can try to use additional Perl or Python scripts and combine it with the existing shell scripts. For example, use Perl to call data from a web service and convert the data to a text format which can be processed furthermore within a bash script. And perhaps, if you show that solution to your client, you may convince him that bash scripts are not the best solution for everything.

added 751 characters in body
Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access. This may not help you for your case, since rewriting a bash script in Powershell will produce a comparable effort as rewriting it in Perl or Python.

Actually, if you cannot replace the old Bash code by no means, I first would try to live with the SQLplus solution and learn as many of the gory details how to deal with the weaknesses of that approach. SQLplus is old and mature, and there are solutions around for almost every problem you might encounter. Perhaps, if you have to add new features, you can try to use additional Perl or Python scripts and combine it with the existing shell scripts. For example, use Perl to call data from a web service and convert the data to a text format which can be processed furthermore within a bash script. And perhaps, if you show that solution to your client, you may convince him that bash scripts are not the best solution for everything.

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access.

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access. This may not help you for your case, since rewriting a bash script in Powershell will produce a comparable effort as rewriting it in Perl or Python.

Actually, if you cannot replace the old Bash code by no means, I first would try to live with the SQLplus solution and learn as many of the gory details how to deal with the weaknesses of that approach. SQLplus is old and mature, and there are solutions around for almost every problem you might encounter. Perhaps, if you have to add new features, you can try to use additional Perl or Python scripts and combine it with the existing shell scripts. For example, use Perl to call data from a web service and convert the data to a text format which can be processed furthermore within a bash script. And perhaps, if you show that solution to your client, you may convince him that bash scripts are not the best solution for everything.

Source Link
Doc Brown
  • 220.6k
  • 35
  • 410
  • 625

Classic unix/linux shell tools are almost always text based - that is their strength (because of simplicity) and their weakness (because of the reasons you gave by yourself). So tools like SQLplus fit in that scheme, because they are text-based, too (though I think you are right, using this through a shell script has a high risk of becoming error prone and fragile).

I don't know any solution to your problem for K or Bash. But in the MS Windows world, there is a modern solution called Powershell which has exactly the capabilities you are asking for, and older scripting languages like VBScript can use COM based APIs like ADO / OLE-DB for database access.