Search Results

Search: Posts Made By: metaltree
2,125
Posted By metaltree
Ah, super! How simple then. Many thanks...
Ah, super!
How simple then.


Many thanks anurag.singh!
2,125
Posted By metaltree
How to pass a variable from shell to awk
I know this topic has been dealt with previously, but the solutions I've seen don't work for me apparently.
I need to pass a variable defined in the shell to one in awk:

$ echo $var1
3
$ cat...
10,278
Posted By metaltree
$ cat script #!/bin/bash cat <(printf...
$ cat script
#!/bin/bash
cat <(printf "aaa\nbbb\n") <(printf "111\n222\n")


$ sh script
script: line 2: syntax error near unexpected token `('
script: line 2: `cat <(printf "aaa\nbbb\n")...
10,278
Posted By metaltree
Thanks, but apparently this goes beyond the...
Thanks, but apparently this goes beyond the Cygwin element.

I tried that on a Linux bash:

1. Works fine as a line:
-bash-3.1$ cat <(printf "aaa\nbbb\n") <(printf "111\n222\n")
aaa
bbb
111...
10,278
Posted By metaltree
What I don't understand is that the command with...
What I don't understand is that the command with < () redirection works perfectly as a single line, but not when included in a script.
10,278
Posted By metaltree
Cannot redirect to STDIN in a shell script
I am unable to use STDIn redirection with < (commands)
When I do the following, both approaches work and give the same results:

1.
$ printf "aaa\nbbb\n" > file1
$ printf "111\n222\n" > file2
$...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 08:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy