내가 찾는 것은(bash)명령을 사용하여 파일을 열고(에서 같은 vim),검색에 대한 특정 문자열을 검색 뒤에 있을 찾기 위해,두 번째 문자열을 출력(만)는 두 번째 문자열입니다. 파일에 대해 다음과 같다:
...
aaa x
...
aaa y
... <-- any number of lines, but necessarily greater than 0
bbb
...
나는 이제까지:
vim -c "/bbb" -c "n" -c "?aaa" -c "n"
이 작동하지 않;vim 읽습니다.
Error detected while processing command line:
E163: There is only one file to edit
Press ENTER or type command to continue
또한 필요를 저장할 문자열 aaa y
으로 파일의 변수-나는 방법을 알아낼 수 없습니다.
TIA