Search Results

Search: Posts Made By: DJR
8,251
Posted By MadeInGermany
I think that code in unquoted here documents is...
I think that code in unquoted here documents is problematic: too many levels of quoting.
In zsh you can chain two (or more) redirections
#!/bin/zsh
filepath=/xxx/yyy/zzz/
filename=xyz

ssh...
1,304
Posted By Don Cragun
Since there is only one input file and one output...
Since there is only one input file and one output file in your original code:
read header < $infile
lineout=...$header...
echo $lineout >> $outfile

while read dataline
do
...
1,304
Posted By Corona688
Every time you do <$infile, it's re-opening the...
Every time you do <$infile, it's re-opening the file, just because that's what it means.

If you want to open the file only once, you can do this:

exec 5<$infile # Open into file descriptor 5
...
1,111
Posted By vgersh99
awk -F, '{a[$1]=($1 in a)?a[$1] OFS $2:$2} END{...
awk -F, '{a[$1]=($1 in a)?a[$1] OFS $2:$2} END{ for(i in a) print i,a[i]}' OFS=, myInputFile.txt
3,321
Posted By Chubler_XL
Yes, there is nothing special about the export...
Yes, there is nothing special about the export command it is just another builtin command that also happens update the value of a variable. The real issue is that variable assignments are treated...
3,321
Posted By Chubler_XL
For ksh try export #!/bin/ksh function...
For ksh try export

#!/bin/ksh
function getParams {
for param in $@
do
export $param="$(db2 +w -x "SELECT PARM_VALUE_TXT FROM ${FRMWRK_DB_SCHEMA}.JOB_PARM WHERE PARM_NM='$param' WITH UR")"...
19,363
Posted By gary_w
To enter a control character, type Ctrl-V...
To enter a control character, type Ctrl-V followed by the control character you need (Ctrl-Y in this case):

$ grep '^YCAT^Y' testfile
CAT
$You can't see the control characters in the output, but...
26,085
Posted By Perderabo
Your problem arises from the fact that "find" is...
Your problem arises from the fact that "find" is not a shell and does not know how to process the pipeline character '|'. My solution would be to switch to a shell. My login shell is ksh so I can...
Showing results 1 to 8 of 8

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