I read a string in a file with the command you see below
[cmd=]egrep -i "Volume.Capacity_datastore1:" /tmp/vmware_api_10.17.127.132.txt[/cmd]
The string it returns is:
Then I added this:
[cmd=]egrep -i "Volume.Capacity_datastore1:" /tmp/vmware_api_10.17.127.132.txt | sed 's/[[:space:]]//g'[/cmd]
and now the string it returns is:
How can I remove from the beginning of the line through the ":"?
Edit: I guess I had to post here to figure it out. The answer is:
[cmd=]egrep -i "Volume.Capacity_datastore1:" /tmp/vmware_api_10.17.127.132.txt | sed 's/[[:space:]]//g' | sed 's/^.*://g'[/cmd]
[cmd=]egrep -i "Volume.Capacity_datastore1:" /tmp/vmware_api_10.17.127.132.txt[/cmd]
The string it returns is:
Code:
Volume.Capacity_datastore1: 122406567936
[cmd=]egrep -i "Volume.Capacity_datastore1:" /tmp/vmware_api_10.17.127.132.txt | sed 's/[[:space:]]//g'[/cmd]
and now the string it returns is:
Code:
Volume.Capacity_datastore1:122406567936
How can I remove from the beginning of the line through the ":"?
Edit: I guess I had to post here to figure it out. The answer is:
[cmd=]egrep -i "Volume.Capacity_datastore1:" /tmp/vmware_api_10.17.127.132.txt | sed 's/[[:space:]]//g' | sed 's/^.*://g'[/cmd]