Sample Header Ad - 728x90

Can't indent heredoc to match code block's indentation

129 votes
10 answers
72964 views
If there's a "First World Problems" for scripting, this would be it. I have the following code in a script I'm updating: if [ $diffLines -eq 1 ]; then dateLastChanged=$(stat --format '%y' /.bbdata | awk '{print $1" "$2}' | sed 's/\.[0-9]*//g') mailx -r "Systems and Operations " -s "Warning Stale BB Data" jadavis6@[redacted].edu <EOI on a new line and break indentation patterns or 2. Keep with indentation but use something like an echo statement to get mailx to suck up my email. I'm open to alternatives to heredoc, but if there's a way to get around this it's my preferred syntax.
Asked by Bratchley (17244 rep)
May 20, 2013, 05:47 PM
Last activity: Jan 18, 2024, 12:47 PM