Skip to content

Commit

Permalink
shell redirections task
Browse files Browse the repository at this point in the history
  • Loading branch information
Baribor committed Mar 14, 2023
1 parent b85f128 commit 002e6f2
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/0-hello_world
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "Hello, World"
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/1-confused_smiley
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "\"(Ôo)'"
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/10-no_more_js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
find . -type f -name "*.js" -delete
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/11-directories
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
find . -mindepth 1 -type d | wc -l
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/12-newest_files
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
ls -t | head -n 10
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/13-unique
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
sort | uniq -u
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/14-findthatword
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
grep -F root /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/15-countthatword
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
grep -F bin /etc/passwd | wc -l
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/16-whatsnext
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
grep -A 3 root /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/17-hidethisword
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
grep -v "bin" /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/18-letteronly
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
grep '^[a-zA-Z]' /etc/ssh/sshd_config
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/19-AZ
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
tr 'Ac' 'Ze'
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/2-hellofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cat /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/20-hiago
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
tr -d "Cc"
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/21-reverse
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
rev
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/22-users_and_homes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
awk -F: '{print $1, $6}' /etc/passwd | sort
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/3-twofiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cat /etc/passwd /etc/hosts
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/4-lastlines
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
tail /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/5-firstline
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cat /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/5-firstlines
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
head -n 10 /etc/passwd
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/6-third_line
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
head -n 3 iacta | tail -n 1
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/7-file
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "Best School" > '\\*\\\\\'"Best School"\\\'\\\\*$\\?\\*\\*\\*\\*\\*:)'
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/8-cwd_state
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
ls -la > ls_cwd_content
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/9-duplicate_last_line
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
tail -n 1 iacta >> iacta
2 changes: 2 additions & 0 deletions 0x02-shell_redirections/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- **0-hello_world**: script that prints “Hello, World”, followed by a new line to the standard output.
- **1-confused_smiley**: Write a script that displays a confused smiley "(Ôo)'.

0 comments on commit 002e6f2

Please sign in to comment.