paste, cut one liner conversation from bash to csh
I have the line:
paste <(cut -f3,4 file1) <(cut -f3,4 file2) > foo.txt Can I do this in csh? It only works in bash. |
Nope. Process substitution is a bash feature (and zsh if I remember well). In csh you have to find a workaround to achieve the same task. For example using gawk or nawk:
Code:
nawk '{ printf "%s %s ", $3, $4; getline < "file2"; print $3, $4 }' file1 > foo.txt |
Brilliant! Thanks for the reply. I wanted to do it with awk but I couldn't figure out how to pass it multiple files. The problem was, I was making a system command call from perl and thought it was interpreting using csh instead of bash... come to find out, it was interpreting with the "sh" shell :)
|
All times are GMT -5. The time now is 07:27 PM. |