function copy_nfs_files {
[ -f /proc/self/mountstats ] && cp /proc/self/mountstats $1/proc-self-mountstats.$2 >/dev/null 2>&1
[ -f /proc/net/rpc/nfsd ] && cp /proc/net/rpc/nfsd $1/proc-net-rpc-nfsd.$2 >/dev/null 2>&1
}
This bash function copies two files /proc/self/mountstats
and /proc/net/rpc/nfsd
. What is the meaning of $1/proc-self-mountstats.$2
? I see $1
just before file name and $2
at the end of file?
I understand that $0
is the basename, $1
the first arg, $2
the second arg, and so on. What I want to know is what it will yield when they are using like $1/proc-self-mountstats.$2
. Let's suppose $1 = 123
and $2 = 100
. You mean it will become 123/proc-self-mountstats.100
?
I googled around to get the meaning but did not get anything around on this.