Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Substring/UNIX-Shell/substring-4.sh
Normal file
10
Task/Substring/UNIX-Shell/substring-4.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
str=abcdefghijklmnopqrstuvwxyz
|
||||
n=12
|
||||
m=5
|
||||
|
||||
printf %s "$str" | cut -c $n-`expr $n + $m - 1`
|
||||
printf %s "$str" | cut -c $n-
|
||||
printf '%s\n' "${str%?}"
|
||||
printf q%s "${str#*q}" | cut -c 1-$m
|
||||
printf pq%s "${str#*pq}" | cut -c 1-$m
|
||||
Loading…
Add table
Add a link
Reference in a new issue