After searching the forum, I found that Bash spawns a subshell when using the pipe. I am wondering if there is an option or any other way to turn off this fuctionality.
We are pulling over some scripts from a Korn shell environment. I have found ways to work around looping from a pipe (Thanks to this forum!!), but we would like to not change this logic. We tried to invoke the korn shell (#!/bin/ksh93) environment but found that this version is old and unacceptable.
[...]We are pulling over some scripts from a Korn shell environment. I have found ways to work around looping from a pipe (Thanks to this forum!!), but we would like to not change this logic.
Just to clarify,
why you don't want to use process substitution (the <(...) syntax)?
Quote:
We tried to invoke the korn shell (#!/bin/ksh93) environment but found that this version is old and unacceptable.
Old? KSH-93 is the most recent version of the KornShelLanguage. It is also most feature-rich implementation of the KornShell. It's currently maintained and continuously improved by its creator David Korn and others at AT&T.
Quote:
Any Ideas? Is there a switch or setting?
Consider that ksh93 is different from the other shells as far as the last command in a pipeline is concerned (it does not fork a subshell), just like you want it to be.
Consider the following:
The Z-Shellbehaves in the same way (as ksh93).
You may change this by enclosing the loop and all the following commands with braces for example:
I'm running a Linux OS that uses Debian as it's base. A commercial vpn is installed that uses OpenVPN. For some reason, I can't get ipv6 to tunnel properly .... and Ipleak.net shows that my location is being unmasked by ipv6.
I've tried kernel commands at boot, I've tried sysctl.conf commands.... (2 Replies)
Hello All,
Is there a way to turn off the caching of the login/password details in ~/.lftp/transfer_log file when i do lftp to remote site. we are using Red Hat Linux OS
/usr/bin/lftp<<-ftp_script
open sftp://$FTPHOST
user $FTPUSER $FTPPASS
lcd /tmp/TEST_Data
put "test.gpg"
bye
ftp_script
... (0 Replies)
Hi guys,
I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file
for eg:
file 1:
xx|yy|"xyz|zzz"|zzz|12...
using below awk command
awk 'BEGIN {FS=OFS="|" } print $3
i would get xyz
But i want as :
xyz|zzz to consider as whole column... (13 Replies)
Hi All
i am cat'ing a file and then using cut to get rid of some info, is there a way to turn the list into one line
i.e
1
2
3
4
5
into
1 2 3 4 5 (4 Replies)
i have a function that's parameter is char *s
and in the main function i am sending that function &(argv), but i dont think this is working, how can i fix this?
can i cast it to be a string or something?
is there a way i can create a new string thats exactly what argv is equal to... (6 Replies)
I am using digital Unix and lpd. I have HP 4200n LaserJet TCP printer, but when I use lpr command, it always print duplex.
I can turn off duplex feature at the panel of the printer, but then other Windows computer cannot print duplex. How can I set up /etc/printcap file so that it will be... (2 Replies)
I have been trying to disable the firewall on a new install of RH8(Psyche). It will NOT stay disabled. I've gone thru system tools, security level and disabled it, and it says YES, like it will save my settings, but when i open it up again, it is always back to HIGH. I also tried using the... (3 Replies)