Need a particular sed / grep command to solve problem
I am running some command in terminal.. and getting the following result
Code:
VRAM (Total): 1024 MB Now I really want to create two commands. 1) remove the gap from start and give the result.. so result should be Quote:
2) Remove starting text entirely and just give Quote:
|
A pure bash solution:
Code:
#!/bin/bash |
Quote:
it needs to be a one line terminal solution.. as I am grepping this in a command.. I want to extend the command to get the desired result.. i guess need some kind of regex to do this? |
Quote:
|
actually need two seperate results.. not in same command.. sorry for the confusion
so one command will give me 1 and second will give me 2.. so I guess I am looking for two seperate grep / sed commands.. |
Code:
c@CW9:~$ echo ' VRAM (Total): 1024 MB' | sed 's/^ *//' |
Quote:
|
All times are GMT -5. The time now is 06:41 AM. |