I'm trying to print the values of the lines associated with dates, now I will be giving an alternate code that pretty much covers what I mean
My File Contents Are:
2020-10-9 Sold 50 Shirts
2021-09-4
My Script is:
export x=10
sed -n '/2020-"$x"/p' < filename
I know I could use 10, but that's not my point here I'm trying to figure out how to use sed using an argument thats an integer.
Desired output would be
2020-10-9