I am trying to automate the copying of changed files into a perforce changelist, but need help getting the generated changelist number. I assume this is probably a straight-forward thing for bash scripting - but I'm just not getting it yet!!...
Basically I execute the command
p4 change -o | sed 's/<enter description here>/This is my description./' | p4 change -i
As a result of this, I get output onto screen something like the line below (obviously the number changes)
Change 44152 created.
What I want, is to be able to capture the generated number into a variable I can then use in the rest of my script (to add future files to the same changelist etc)...
Can anyone please advise?
Thanks