Bash equivalent of a PowerShell script built into R script to run on an Rshiny server

I use the following script to query and retrieve data using the solr API and read the generated csv output as a csv file. I want to pass this script to run on the RShiny server. Any suggestions please?

url <- "curl 'https://[site.orgnaization.com/solr/someFolder/select?q=*:*&rows=1000&wt=csv' -L -u username:password --location-trusted -b cookie-jar.txt > C:/Folder/Filename.csv" fileConn <- file("C:/Folder/PowerShellFile.ps1") writeLines(url, fileConn) close(fileConn) system2("PowerShell", args = c("-file", "C:\\Folder\\PowerShellFile.ps1")) DataFromSolr <- data.frame(read.csv("C:/Folder/Filename.csv",header = TRUE, sep = "," , fill = TRUE ,fileEncoding = "UTF-16LE")) 
+1
bash r curl
Aug 17 '17 at 19:47 on
source share
1 answer

I installed PowerShell from this site [ https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#ubuntu-1604] on a Linux server and solved the problem.

0
Aug 20 '17 at 23:38 on
source share



All Articles