Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
es
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Peth
es
Commits
2caa0295
Commit
2caa0295
authored
8 years ago
by
Peter Gerwinski
Browse files
Options
Downloads
Patches
Plain Diff
Beispiele für Unix-Skript-Programmierung und reguläre Ausdrücke
parent
9def79d6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
20161020/regular-expressions.log
+29
-0
29 additions, 0 deletions
20161020/regular-expressions.log
20161020/xkcd.sh
+8
-0
8 additions, 0 deletions
20161020/xkcd.sh
with
37 additions
and
0 deletions
20161020/regular-expressions.log
0 → 100644
+
29
−
0
View file @
2caa0295
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | grep "^H[aeiou]"
Hello, world!
cassini/home/peter/bo/2016ws/es/20161020> echo "HEllo, world!" | grep "^H[aeiou]"
cassini/home/peter/bo/2016ws/es/20161020> echo "Hxllo, world!" | grep "^H[aeiou]"
cassini/home/peter/bo/2016ws/es/20161020> echo "Hxllo, world!" | grep "^H[^xyz]"
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | grep "^H[^xyz]"
Hello, world!
cassini/home/peter/bo/2016ws/es/20161020> cat xkcd.sh
#!/bin/sh
echo -n "http:"
curl -s http://xkcd.com \
| grep "img src=" \
| grep -v "terrible_small_logo" \
| grep -v "Selected Comics" \
| sed -e 's/^[^"]*"//' \
| sed -e 's/".*$//'
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | sed -e 's/ll/xx/'
Hexxo, world!
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | sed -e 's/ll//'
Heo, world!
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | sed -e 's/^ll//'
Hello, world!
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | sed -e 's/^.*ll//'
o, world!
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | sed -e 's/^[aeiou]*ll//'
Hello, world!
cassini/home/peter/bo/2016ws/es/20161020> echo "Hello, world!" | sed -e 's/^[Haeiou]*ll//'
o, world!
cassini/home/peter/bo/2016ws/es/20161020>
This diff is collapsed.
Click to expand it.
20161020/xkcd.sh
0 → 100755
+
8
−
0
View file @
2caa0295
#!/bin/sh
echo
-n
"http:"
curl
-s
http://xkcd.com
\
|
grep
"img src="
\
|
grep
-v
"terrible_small_logo"
\
|
grep
-v
"Selected Comics"
\
|
sed
-e
's/^[^"]*"//'
\
|
sed
-e
's/".*$//'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment