I've got this directory full of images, and I can do this:echo *.jpgimage1.jpg image2.jpg image3.jpg # and so onHow can I get the output in a plain text file in this format?image1.jpgimage2.jpgimage3.jpg
Index names of all the files in a plain text file
bash;command line;files
Avoid using ls, bash globs can do it betterprintf '%s\n' *.jpg >output_file