Advertisement
pjmakey2

Actualizacion manifiesto con bash

Sep 9th, 2013
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #/bin/bash
  2. out=$(cat cache.manifest | egrep -i --color 'VERSION:'  | awk '{ print $2}')
  3. pat=$(cat cache.manifest | egrep -i --color 'VERSION:')
  4. newv=$(expr $out + 1)
  5. repl='#VERSION: '$newv''
  6. echo $pat
  7. echo $repl
  8. sed -i "s/$pat/$repl/g" cache.manifest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement