Results 1 - 6 of about 6 results out of about 107589 pages. (0.02 seconds)

ParsingLs . . . 1 match
...d-splitting and globbing here, same mistake as above. }}} See BashPitfalls and DontReadLinesWithFor for more details. Things get more difficult if you wanted some specific sortin...

13.8k - rev: 36 (current) last modified: 2023-08-12 13:05:09

CategoryShell . . . 1 match
...##master-page:CategoryTemplate ##master-date:Unknown-Date #format wiki #language en These pages discuss issues associated with the Unix command line shells, especially bash, but a...

0.6k - rev: 2 (current) last modified: 2009-03-11 17:10:59

BashPitfalls . . . 1 match
.... For example: {{{ IFS=$'\n' for line in $(cat file); do … # Wrong! }}} [[DontReadLinesWithFor|This doesn't work]]! Especially if those lines are filenames. Bash (or any ot...

86.2k - rev: 572 (current) last modified: 2024-04-04 23:09:24

BashGuide/Practices . . . 1 match
...le`, `tr ' ' '\n' < /my/file`, ...). * '''`for line in $(<file); do`''' . [[DontReadLinesWithFor|Don't use a for loop]] to read the lines of a file. Use a [[BashFAQ/001|while ...

30.2k - rev: 61 (current) last modified: 2023-06-12 00:57:43

BashFAQ/005 . . . 1 match
...\n' read -rd '' -A lines <file }}} ===== Don't read lines with for! ===== '''[[DontReadLinesWithFor|Never read lines using for..in loops]]!''' Relying on [[IFS]] WordSplitting cau...

19.7k - rev: 77 (current) last modified: 2023-03-25 22:39:06

BashFAQ/001 . . . 1 match
... read a file (data stream, variable) line-by-line (and/or field-by-field)? == [[DontReadLinesWithFor|Don't try to use "for"]]. Use a `while` loop and the `read` command. Here is ...

9.8k - rev: 72 (current) last modified: 2023-06-28 01:53:29