小编Lev*_*ike的帖子

Is piping, shifting, or parameter expansion more efficient?

I'm trying to find the most efficient way to iterate through certain values that are a consistent number of values away from each other in a space separated list of words(I don't want to use an array). For example,

list="1 ant bat 5 cat dingo 6 emu fish 9 gecko hare 15 i j"
Run Code Online (Sandbox Code Playgroud)

So I want to be able to just iterate through list and only access 1,5,6,9 and 15.

EDIT: I should have made it clear that the …

performance pipe shell-script cut

27
推荐指数
3
解决办法
3061
查看次数

How does mount know that it's a cifs mount without -t?

So this command: /bin/mount -o soft,cache=none,rw,nosuid,noexec,pass="" //$ServerIP/share $LocalDir works, but I thought it'd need -t cifs added.

I see the man page says

If no -t option is given, or if the auto type is specified, mount will try to guess the desired type. Mount uses the blkid or volume_id library for guessing the filesystem type; if that does not turn up anything that looks familiar, mount will try to read the file /etc/filesystems, or, if that does not exist, …

mount cifs

3
推荐指数
1
解决办法
119
查看次数

标签 统计

cifs ×1

cut ×1

mount ×1

performance ×1

pipe ×1

shell-script ×1