Hello,
I am working on a windows machine running the cygwin command line interface. I have a spreadsheet that contains references to records kept in a group of text files, from which I need to pull out data. Given that the data set contains >5k references, manually typing out a command for each one is not an option. I figured I could save myself some work by letting the spreadsheet concatenate the commands. This created an output like so:
Quote:
awk 'BEGIN{RS=ORS="\n\n\n}"/80303708953/{print}' HH*txt |awk '/desolada/ && /showed/{print}'
awk 'BEGIN{RS=ORS="\n\n\n}"/80305245858/{print}' HH*txt |awk '/sarenace/ && /showed/{print}'
awk 'BEGIN{RS=ORS="\n\n\n}"/80305597498/{print}' HH*txt |awk '/sarenace/ && /showed/{print}'
awk 'BEGIN{RS=ORS="\n\n\n}"/80307301507/{print}' HH*txt |awk '/bboys777/ && /showed/{print}'
...
...
|
On my previous fedora system at university, if I had a file full of commands as above, I would type out
The idea was I would copy the entire lot of commands and type
Quote:
cat /dev/clipboard |/bin/bash
|
And it failed to work, giving me a heap of syntax errors.
I have tried various solutions using combinations of backquotes, redirecting /dev/clipboard to /dev/stdin and so on; but nothing seems to work. Confusingly, when I copy and paste one command at a time directly into the cygwin shell, it works perfectly!?!? Would anyone have any idea how to fix this?