On a Centos 6 machine, this works: and this doesn’t: I get: Nevermind the grep and tail. The problem is with the process substitution thingy: <(…) Can someone tell me what sh does differently here? [EDIT] Thanks for the answers! The problem arose while using capistrano for deployments. It defaults to using sh but I changed that to bash now.
Tag: sh
How to call variables from ip.txt file to .sh file?
I have list of ip addresses in one txt file which I have named ip.txt I want to call those ip in my .sh file, I am not sure how to proceed here.. here I did soemthing Please tell me how to do that? Answer This should make it: or using for as you do because the syntax is: for
how to include a file containing variables in a shell script
i have many script shell and i want to include a file containing variables in this shell script? My var script: My script sh: Thx. Answer It depends which shell, but one of these two usually works: or I’m not sure about ksh, but I’d imagine both would work.
Terminal edit command in a editor [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 9 years ago. Improve this question I am coming from the postgres world, and am not very new to UNIX. My question is, if there is a way to invoke a editor from command
Bash: Inserting one file’s content into another file after the pattern
I’m trying to write a bash script, which will do the following: reads the content from the first file (as a first argument) reads the content from the second file (as a second argument) finds the line in the second file with the given pattern (as a third argument) inserts text from the first file to the second file after
dos2unix command
I have this script I want to remove “^M” charcaters from many files which are in more subdirectories. I got this: Is there somethig i’m missing? Thanks in advance. Answer I guess you don’t need a for loop. Here is a quick panorama of solutions for files with extension “.ext” (such commands shall be somehow restrictive) note : ^M is
How can I show the wget progress bar only? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question