Skip to content

Tag: bash

How to open files sequentially on a terminal?

I want to iterate through all files in a directory and open them with an editor, but I don’t want to open the next one until the previous has closed. something like: Answer You don’t have to do anything; the shell blocks until vim exits each time through.

Unable to get the output using regex

This might be a silly one, but I’m unable to get the required output. I’ve a file named Abc_sfgf_kjwefgk.txt20180929_040845 in a directory. I’m trying to list the file using the command: ls -l Abc_sfgf_kjwefgk.txt[0-9]{8}_[0-9]{4} But it’s giving me error: ls: cannot access ‘Abc_…