Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
23
rated 0 times [  23] [ 0]  / answers: 1 / hits: 65424  / 3 Years ago, thu, may 20, 2021, 11:51:52

I need a script that inputs a file and echos its contents with linebreaks removed - "word wrapped" so to speak.



I've tried:



#!/bin/bash
find $HOME '$1' | while read line; do echo "${line}"; done


but it just returns nothing.


More From » bash

 Answers
1

Try doing this:



echo $(cat $1)

[#35589] Thursday, May 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bearous

Total Points: 226
Total Questions: 116
Total Answers: 136

Location: Guernsey
Member since Sun, Jan 10, 2021
3 Years ago
;