使用exFat分区格式化Android智能手机的microSD卡[关闭](Format microSD card for Android smart phone with exFat partition [closed])
使用exFat分区为我的Android智能手机格式化microSD卡的最佳方法是什么? 从Android存储设置格式化不会为我提供分区类型的选项。 我也尝试从Windows格式化,我的手机通过USB连接到我的电脑(并安装了SDCard),但我没有从Windows格式实用程序中获得任何选项。
我是否需要使用microSD读卡器才能完成此操作?
what is the best way to format a microSD card for my Android smart phone with an exFat partition? Formatting from the Android storage settings doesn't give me an option for the partition type. I have also tried to format from Windows with my phone connected to my computer via USB (and SDCard mounted), but I am not given any options from the Windows Format utility.
Do I need to get a microSD card reader to do it?
原文:https://stackoverflow.com/questions/18019547
最满意答案
尝试
$ awk -F',' '$2!~/[aeiouAEIOU]/' sample.txt 103,Lr,Lawrencium 104,Rf,Rutherfordium 105,Db,Dubnium 106,Sg,Seaborgium 107,Bh,Bohrium 108,Hs,Hassium 109,Mt,Meitnerium 110,Ds,Darmstadtium 111,Rg,Roentgenium 112,Cn,Copernicium 113,Nh,Nihonium 114,Fl,Flerovium 115,Mc,Moscovium 116,Lv,Livermorium 117,Ts,Tennessine
!~
在比赛中返回false$2~/[^aeiouAEIOU]/
表示如果第二个字段包含任何非元音字符,则返回true。所以,No
将匹配,因为N
是非元音字符
- 这可以通过整个字符串匹配来纠正:
$2~/^[^aeiouAEIOU]+$/
tolower($2) !~ /[aeiou]/
也可以用来代替$2 !~ /[aeiouAEIOU]/
Try
$ awk -F',' '$2!~/[aeiouAEIOU]/' sample.txt 103,Lr,Lawrencium 104,Rf,Rutherfordium 105,Db,Dubnium 106,Sg,Seaborgium 107,Bh,Bohrium 108,Hs,Hassium 109,Mt,Meitnerium 110,Ds,Darmstadtium 111,Rg,Roentgenium 112,Cn,Copernicium 113,Nh,Nihonium 114,Fl,Flerovium 115,Mc,Moscovium 116,Lv,Livermorium 117,Ts,Tennessine
!~
to return false on a match$2~/[^aeiouAEIOU]/
means return true if second field contains any non-vowel character.. so,No
will match becauseN
is non-vowel character
- this can be corrected by whole string match:
$2~/^[^aeiouAEIOU]+$/
tolower($2) !~ /[aeiou]/
can also be used instead of$2 !~ /[aeiouAEIOU]/
相关问答
更多-
是的,在awk使用match()函数并为其提供可选的数组参数(在我的示例中为a)。 当你这样做时,第0个元素将是匹配正则表达式的部分 $ echo "blah foo123bar blah" | awk '{match($2,"[a-z]+[0-9]+",a)}END{print a[0]}' foo123 Yes, in awk use the match() function and give it the optional array parameter (a in my example). Whe ...
-
使用-v声明varialbe awk -F, -v zips="23456|23458|23451" '$7 ~ zips' sample.csv Use -v to declare the varialbe awk -F, -v zips="23456|23458|23451" '$7 ~ zips' sample.csv
-
这是非常基本的 awk '/pattern/{ print $0 }' file 请求awk使用//搜索pattern ,然后打印// ,默认情况下称为记录,由$ 0表示。 至少阅读文档 。 如果你只想打印出匹配的单词。 awk '{for(i=1;i<=NF;i++){ if($i=="yyy"){print $i} } }' file This is the very basic awk '/pattern/{ print $0 }' file ask awk to search for patt ...
-
awk正则表达式匹配问题(Awk regex matching problem)[2021-01-21]
在awk中使用循环是一个非常奇怪的构造; 我只是做 awk '/^un.{2,}[aeiouAEIOU]{2}$/' < file.txt As grok12 said, the problem was an empty space at the end of "unaaaiuolaa". Deleting it solved the problem. -
[根据澄清更新。] 一个高阶位是Awk是一种面向行的语言,因此您实际上无法进行正常的模式匹配以跨越行。 做这样的事情的通常方法是分别匹配每一行,如果所有正确的部分都匹配,则使用后面的子句/语句。 我在这里做的是在一行的第二个字段中查找a ,在另一行的第二个字段中查找b ,在第三行的第二个字段中查找c 。 在前两种情况下,我会隐藏该行的内容以及它所发生的行号。 当第三行匹配并且我们还没有找到整个序列时,我返回并检查是否存在其他两行并且具有可接受的行号。 如果一切顺利,我打印出缓冲的前一行并设置一个标志,指示其 ...
-
尝试 $ awk -F',' '$2!~/[aeiouAEIOU]/' sample.txt 103,Lr,Lawrencium 104,Rf,Rutherfordium 105,Db,Dubnium 106,Sg,Seaborgium 107,Bh,Bohrium 108,Hs,Hassium 109,Mt,Meitnerium 110,Ds,Darmstadtium 111,Rg,Roentgenium 112,Cn,Copernicium 113,Nh,Nihonium 114,Fl,Fleroviu ...
-
我想要一个正则表达式,它将在TXT之后得到所有的东西,并且只显示直到; grep -oP 'TXT[^;]*' filename 使用awk : awk -F';' '{print $1}' filename 使用sed : sed 's/\([^;]*\).*/\1/' filename I want a regex that will get everything after TXT and only display that up until the ; grep -oP 'TXT[^;]*' ...
-
这将实现预期的结果: awk '/regex2/ { print $1 }' 否则,您需要两次读取文件并执行以下操作。 它将在var存储/regex2/的最后一次出现。 重新读取文件后,它将为/regex1/每次出现打印var 。 请注意,您将在输出中获得一个空行,并在换行符上显示关键字“This”: awk 'FNR==NR && /regex2/ { var = $1; next } /regex1/ { print var }' file.txt{,} This would achieve the ...
-
+修饰符表示“前一个模式中的一个或多个”,即文字# ,因此这仅匹配包含从第1列开始的一个或多个连续哈希的行的开始部分。 对于锚定(开始线)匹配,您将需要: ^#.* AFAICR,。 与换行符不匹配。 这意味着以#开头的行后跟零个或多个任何类型的其他字符(换行符除外)。 不要忘记awk注释awk于从一行的开头开始: awk '{ # This comment is indented by a number of spaces print $1; # And this i ...
-
对于更简单明了地表达意图的替代解决方案,并且它还具有本地意识(并不总是只匹配ASCII字母),请参阅Ed Morton的有用答案 。 尝试以下(POSIX兼容): awk '/^\([0-9]+\).*([A-Z].*[a-z]|[a-z].*[A-Z]).*\.$/ { ++x } END { print x+0 }' file ^\([0-9]+\)匹配行开头括号中的十进制数。 \.$匹配直线末尾的文字周期。 .*([AZ].*[az]|[az].*[AZ]).*匹配其间的任何字符串: 或者 :至少包 ...