|
2011-09-06
, 11:39
|
Posts: 144 |
Thanked: 68 times |
Joined on Mar 2011
@ a spot
|
#2
|
|
2011-09-06
, 11:47
|
Banned |
Posts: 3,412 |
Thanked: 1,043 times |
Joined on Feb 2010
|
#3
|
|
2011-09-06
, 11:56
|
Banned |
Posts: 3,412 |
Thanked: 1,043 times |
Joined on Feb 2010
|
#4
|
|
2011-09-06
, 12:07
|
Posts: 144 |
Thanked: 68 times |
Joined on Mar 2011
@ a spot
|
#6
|
You use the browser in your device to see it is there or not also you can use your pc browser to see it and write or mount whatever you want.
You need to be more specific to what problem your having.
|
2011-09-06
, 12:08
|
Posts: 144 |
Thanked: 68 times |
Joined on Mar 2011
@ a spot
|
#7
|
|
2011-09-06
, 12:09
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#8
|
TEST=`grep -o mmcblk1p1 /etc/mtab`; if [ ! -z "$TEST" ]; then # do something else # don't do something fi
The Following User Says Thank You to magick777 For This Useful Post: | ||
|
2011-09-06
, 12:11
|
Posts: 144 |
Thanked: 68 times |
Joined on Mar 2011
@ a spot
|
#9
|
|
2011-09-06
, 12:15
|
Posts: 144 |
Thanked: 68 times |
Joined on Mar 2011
@ a spot
|
#10
|
The list of what's mounted is /etc/mtab, and the mmc is /dev/mmcblk1p1.
So something like
Edited to explain:Code:TEST=`grep -o mmcblk1p1 /etc/mtab`; if [ ! -z "$TEST"; then # do something else # don't do something fi
First line sets the variable $TEST with the output of the command that's in backticks. The grep command searches for the mmcblk1p1 in the list of what's currently mounted, the -o switch says output only what matched.
Then, in shell, if that gets us a non zero length response, well, we found what we were grepping for, if not we didn't...
I need to make a script which checks if the memory card is plugged in my N900, i.e. is mounted. It goes like...
if [ code to see if mmc card plugged in ]; then...
Yes, I am still at the learning phase and I tried searching lots of forums and other websites but no go, please HELP! the poor.
Last edited by GigaByte; 2011-09-06 at 11:05.