I have one question.
Is it possible to run unix command directly from java {not as a shell script} ? I saw ls command is directly executed the output viewed getting object of bufferedReader. Actually I want ** cat fil*.csv >> filAppended.csv ** run this command directly from java.
I have one question. Is it possible to run unix command directly from java
Share
The >> part of your command is not an argument to cat, but handled by the shell to do the output redirection.
You can access the output stream from the Process object returned by Runtime.getRuntime().exec(), and can then read from that and append it to the ‘filAppended.csv’.