0

I have a shell script make with Linux with this code:

 #!/bin/sh

    awk '{ print $3,$2,$4,$1}' df_real_credit_network_B0.00_BC0.00_l33.33_day1 > credit_adj
    awk '{ print $3,$2,$5,$1}' df_real_interbank_network_B0.00_BC0.00_l33.33_day1 > interbank_adj

The script creates two objects: "credit_adj" and "interbank_adj", necessary for others scripts for the software R. Obliviously Windows don't recognize the script, so I try to modify the extension ".sh" with ".bat" and I deleted the string "#!/bin/sh" from the script. In this way the two objects are created but are empty, because windows don't recognize the instruction awk. How can I create the two objects correctly?

Thanks

  • 1
    possible dup: http://stackoverflow.com/questions/21927944/how-to-run-an-awk-commands-in-windows – EDi Jan 28 '15 at 22:55

1 Answers1

0

You cannot directly run a Unix shell script in windows, One way to run unix/Linux shell script in windows is , install cygwin in windows and run script inside cygwin

Steephen
  • 13,137
  • 6
  • 34
  • 44
  • I'm trying to instal cygwin on my pc, but doesn't work...I've downloaded the installer from [link](https://www.cygwin.com/) but don't start.. – Giacomo Rosaspina Jan 28 '15 at 23:45