Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7f8f8e6

Browse files
Update Unix lecture with small notes and fixes
This commit fixes a typo, makes sure the `awk` example works on state, and gives the core basics of regular expressions using `sed` These changes were done to make the lecture more accurate and with notes for future reference.
1 parent db63e9e commit 7f8f8e6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎notes/unix_outline.org‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,14 @@ columns/fields in the file, which may be useful in manipulating the file.
629629
Now that we have the general syntax, let's try out some ~awk~ commands.
630630

631631
#+BEGIN_SRC sh
632-
# Reminder rof what the -l flag does
632+
# Reminder of what the -l flag does
633633
ls -l
634634
#+END_SRC
635635

636636
#+BEGIN_SRC sh
637637
# Examples of awk and potential actions
638-
ls -l | awk '{ print 6ドル " " $10 }'
639-
ls -l | awk '{ print $6 * 2 }'
638+
ls -l | awk '{ print 6ドル " " $9 }'
639+
ls -l | awk '{ print $7 * 2 }'
640640
#+END_SRC
641641

642642
*** Resources and more
@@ -657,6 +657,8 @@ A simple use of ~sed~ is for replacing text.
657657

658658
#+BEGIN_SRC sh
659659
# Use sed to replace day and night
660+
# Basic regular expressions:
661+
# s/<find this...>/<...and replace with this>/
660662
echo Sunday | sed 's/day/night/'
661663
#+END_SRC
662664

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /