Stick To The Script Flashcards

1
Q

Command to replace data for consistency
ie: 2 sets of datasets to be analyzed together

A

sed command (stream editor)
sed s/(old_value)/(replacement_value)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Command for data extraction and reporting against streams of text

A

awk
awk -F(delimiter) ‘{print $(field_number)}’

-F is the option for doing field separation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you declare a shell script using bash?

A

(hashtag)#!/bin/bash

Shebang-bin-bash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Command to make a shell script executable

A

chmod +x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Common text editors available within terminal

A

nano
vi
vim
emacs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Syntax to Pass Arguments

A

$1(argument 1) $2 (argument 2)….
$0 is always used to print the filename of the script that is currently being executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly