![]() |
2012-12-01
, 21:14
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#22
|
Yeah, do so please.As this script does not depend on anything.
And name the output something like "swap amount written". Or make it a percentage value (even bettter).
disk=$(cat /proc/swaps | awk '/dev/ {print $1}' | cut -d "/" -f 3)
![]() |
2012-12-01
, 21:37
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#23
|
This outputs the current partition without the "/dev/" part "mmcblk1p2" and fits it perfect.Code:disk=$(cat /proc/swaps | awk '/dev/ {print $1}' | cut -d "/" -f 3)
But where do I get the total number of bytes to get a percentage?
awk '{if ($1=="'"/dev/$disk"'") print $3}' /proc/swaps
The Following User Says Thank You to peterleinchen For This Useful Post: | ||
![]() |
2012-12-01
, 22:22
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#24
|
![]() |
2012-12-11
, 19:34
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#25
|
The Following 9 Users Say Thank You to sixwheeledbeast For This Useful Post: | ||
![]() |
2012-12-11
, 21:19
|
Posts: 107 |
Thanked: 173 times |
Joined on Feb 2011
|
#26
|
![]() |
2012-12-12
, 00:39
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#27
|
The Following User Says Thank You to sixwheeledbeast For This Useful Post: | ||
![]() |
2012-12-12
, 08:16
|
Posts: 1,397 |
Thanked: 2,126 times |
Joined on Nov 2009
@ Dublin, Ireland
|
#28
|
![]() |
2012-12-12
, 13:48
|
Posts: 2,292 |
Thanked: 4,135 times |
Joined on Apr 2010
@ UK
|
#29
|
Would you try to upload it to the repos? At least the dput method is still working.
The Following User Says Thank You to sixwheeledbeast For This Useful Post: | ||
![]() |
2012-12-12
, 14:51
|
Posts: 249 |
Thanked: 277 times |
Joined on May 2010
@ Brighton, UK
|
#30
|
And name the output something like "swap amount written". Or make it a percentage value (even bettter
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!
Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257
editsignature, http://talk.maemo.org/profile.php?do=editsignature