Search Results

Search: Posts Made By: MastaFue
1,656
Posted By MastaFue
sed or grep?
hello everybody!

I have a html file which is not properly formatted meaning that the whole content is in one line.
I want to to cut out certain parts of that file. Those parts are between ' #" '...
13
8,663
Posted By MastaFue
alright here is a working solution I found (since...
alright here is a working solution I found (since I am only answering myself^^) if anybody is interested:

uptime | sed 's/.*up \(.*\),.*user.*/\1/' | awk '{sub(":", " hours ", $0); sub(" mins",...
13
8,663
Posted By MastaFue
alright this command uptime | sed 's/.*up...
alright this command

uptime | sed 's/.*up \(.*\),.*user.*/\1/' | awk '{sub(":", " hours ", $0); sub(" mins", "min", $0); sub(" secs", "sec", $0); sub(",", "", $0); print "uptime: " $0}'

works...
13
8,663
Posted By MastaFue
thank you for the help and the explanation! ...
thank you for the help and the explanation!

@Franklin52

your solution worked but I am not sure if it works if the computer has been on for more than 24 hours because then the string changes...
13
8,663
Posted By MastaFue
@perderabo the command you used does not...
@perderabo

the command you used does not work either because you don't use the command uptime you use echo "0:19 up 10 mins, 2 users, load averages: 0,61 0,54 0,31" | sed 's/.*up...
13
8,663
Posted By MastaFue
none of the suggestions work
here is a list of the commands and what output they produce (btw I use Leopard OS X):

uptime | cut -d" " -f4-8 | sed 's/,//g'

-> up 9 mins 2 users



uptime | sed 's/, *[0-9]*...
13
8,663
Posted By MastaFue
Does not work
it does not seem to work. this is the result

6 mins 2 users load

btw I am new at unix. so I don't now how to modify this command since i don't know cut and sed.

any other suggestions?
13
8,663
Posted By MastaFue
Uptime
hello folks!

how can I display just the uptime without the current time, the word "up", and the load averages using the uptime command or some other command I do not know about?
10,401
Posted By MastaFue
change title of post
is there nobody out there who knows how to modify the uptime command?

I would rename the title of the post if I could maybe more people would respond to a title like "uptime" but i don`t know if...
10,401
Posted By MastaFue
geekTool
Hello!

Here is my problem:

I try to display the uptime of my computer on my desktop with the help of a tool called GeekTool (for Mac).
I want the uptime output to look like that:
x day(s) y...
2,796
Posted By MastaFue
alright thanks for the answers. it might have...
alright thanks for the answers. it might have been a fault on my side.
2,796
Posted By MastaFue
password
Hello!

I am using a macbook pro with leopard on it. Once I used the Terminal to type in a sudo command and it promted me to type in my password so I did. A few weeks later I found an invisible...
13,232
Posted By MastaFue
Thanks a lot era! All my questions are answered!
Thanks a lot era! All my questions are answered!
13,232
Posted By MastaFue
Thank you era, you solved my problem. I am...
Thank you era, you solved my problem.

I am new at unix so I have to ask some questions if you don't mind.

How did you exactly replace the comma in your command line and what does sub actually...
13,232
Posted By MastaFue
thank you for the quick response when i use...
thank you for the quick response

when i use the line

uptime | sed -e 's/:/h /g' -e 's/,/min/g' | awk '{print "Uptime: " $5 " "$6}'


it looks like that

Uptime: 45min 2

But I expected...
13,232
Posted By MastaFue
GeekTool
Hello to whoever is reading this!

I try to display my uptime on my desktop with a program called GeekTool.
For that purpose I use this command

uptime | awk '{print "Uptime : " $3 " " }'

So...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 10:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy