I'm doing one of the courses on bash, which seems a bit outdated.I have a simple script below, which should allow me to see lines as they are read or executed, but my console gives nothing back. The $1 argument passed to bartek_report.sh is missing on purpose as I wanted to see what happens when the console hangs. Using the latest Ubuntu.
#!/bin/bash -v #or -x # creates a report for a single container # exercise: add a variable called 'directory' # that determines where we save our output file directory="reports" mkdir -p $directory grep $1 shipments.csv > $directory/$1.csv echo Report created in $directory under filename $1.csv
When I call the script under bash it just hangs like without -x or -v, why?
bartek@Lenovo-LAB~/Desktop/Devs/bash_learning/02/demos/after_m2$ sh bartek_report.sh [blinking cursor]