×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
 
Hi Jay,
I was thinking along the same lines as Jack...  you've probably got a 
different version of 'ls' in your PATH or something.
I also notice that your 2nd example includes the full path vs. just the 
file name, which also seems to indicate you are picking up a different 
version of ls.
The default mode in 'ls' is actually to print multiple files per line. 
If you want just one per line, most 'ls' utilities have a -1 (that's the 
number 1) switch that can be passed that means "one per line".
So try it like this:
qsh cmd('cd /home/jvaughn/.ssh && ls -1A')
Since it's listing the current directory, it's less likely to give you 
the paths.  And the -1 explicitly tells it to only include one per line. 
 (-1A is -1=one per line, and -A=include hidden files.)
Also, FWIW, I don't recommend using OVRDBF FILE(STDOUT) in a production 
program.  It's fine for a one-off or just messing around, but... if it's 
a "real" program, consider piping the output to Rfile to write it to a 
PF, or use a redirect to write it to a stream file.
-SK
On 4/15/2022 1:55 PM, Jay Vaughn wrote:
I'm trying to figure out why 2 different IBM i's produce different stdout
outputs...
system1
OVRDBF FILE(STDOUT) TOFILE(QTEMP/DIRLIST)
        OVRSCOPE(*JOB)
        OPNSCOPE(*JOB)
  qsh cmd('ls -A /home/jvaughn/.ssh')
   SRCSEQ    SRCDAT   SRCDTA
      .00         0   xyz_rsa_prv
      .00         0   xyz_rsa_pub
      .00         0   abc_rsa_prv
      .00         0   abc_S_rsa_pub
********  End of data  ********
output nicely per row in qtemp/dirlist
system 2
same steps above but...
    SRCSEQ    SRCDAT   SRCDTA
       .00         0   /home/jvaughn/.ssh/STOREPORT_rsa_pub
  /home/jvaughn/.ssh/i
       .00         0   /home/jvaughn/.ssh/id_rsa
/home/jvaughn/.ssh/known_h
  ********  End of data  ********
2 files per row instead of 1...
tia
Jay
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.