Skip to content

Instantly share code, notes, and snippets.

@k3170makan
Created May 17, 2019 07:30
Show Gist options
  • Save k3170makan/80b3dce6d72fda84b08778a474c56de9 to your computer and use it in GitHub Desktop.
Save k3170makan/80b3dce6d72fda84b08778a474c56de9 to your computer and use it in GitHub Desktop.
Quick script for finding device file_operations structs quickly and opening them in vim
for line in `grep --color=never * -Rnie file_operations`; do LINE=`echo $line | awk -F\: '{ print $2 }'`; FILE=`echo $line | awk -F\: '{ print $1 }'`; [ "$LINE" != "" ] && echo "[*] vim +"$LINE" $FILE"; done > vim_cmds.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment