1

Bash newbie help -

view story
linux-howto

http://ubuntuforums.org – Hello - I'm a bash newbie and would be very grateful for your help. I need to run a bash script via cron to update a file. The file is a .DAT (similar to csv) and contains pipe separated values. I need to insert a header row at the top. I would like to: 1) Make a backup of the file 2) Insert a header row if not already present 3) Save the file (replacing the old one) 4) add a success or failure message (perhaps appended to the cron email). 5) Exit 1) run via cron on my server for a specific user account Here's what I have so far: Code: #!/bin/bash # Grab the file, make a backup and (Hardware)