You should be able to buy a filament type edger for under $100. It will cut a straight line at the sidewalk edge. First time, you may have to manually scoop up grass and soil if there is a layer over the walk.
I grew up with gas edgers but there is probably no reason to go for one unless you have 900,000 linear feet of sidewalk or something. We beat them up in the turf management business before electric and even cordless trimmers came along.