[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wrong line numbers in errors
From: |
Matthias Urlichs |
Subject: |
Wrong line numbers in errors |
Date: |
Sat, 3 Feb 2024 14:36:31 +0100 |
User-agent: |
Mozilla Thunderbird |
Version 5.2.15
see example script below, the unassigned $nope is reported to be in line
4 which is obviously wrong. Removing the parentheses around the echo
fixes the problem.
#!/bin/bash
set -u
( echo x ) | while read f ; do
echo Test $f
echo Test $f
echo Test $f
echo Test $f
echo Test $f
done
echo $nope
--
-- mit freundlichen Grüßen
--
-- Matthias Urlichs
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Wrong line numbers in errors,
Matthias Urlichs <=