Browse Source

xcat

master
zeus 4 years ago
parent
commit
086e3880c9
  1. 12
      cat/0_Display_Content/code
  2. 1
      cat/0_Display_Content/codeanswer
  3. 0
      cat/0_Display_Content/codehelp
  4. 24692
      cat/0_Display_Content/data
  5. 32
      cat/0_Display_Content/info
  6. 9
      cat/0_Display_Content/q-info
  7. 6
      cat/intro
  8. 28
      index_cat.yml

12
cat/0_Display_Content/code

@ -0,0 +1,12 @@
echo "Display Contents of a file on the standard output (stdout)."
echo "----------------------------------------------------------"
cat $LLO_DATAFILE | head -5
echo ""
echo "redirect standard output of a file into a new file"
echo "----------------------------------------------------------"
cat $LLO_DATAFILE | head -5 > /tmp/newfile
ls -al /tmp/newfile

1
cat/0_Display_Content/codeanswer

@ -0,0 +1 @@
cat -n $LLO_DATAFILE | head -5

0
cat/0_Display_Content/codehelp

24692
cat/0_Display_Content/data

File diff suppressed because it is too large

32
cat/0_Display_Content/info

@ -0,0 +1,32 @@
Display Contents of a file on the standard output (stdout).
[source,bash]
----
cat $LLO_DATAFILE | head -5
----
redirect standard output of a file into a new file
[source,bash]
----
cat $LLO_DATAFILE | head -5 > /tmp/newfile
ls -al /tmp/newfile
cat /tmp/newfile
----
[INFO]
====
DATAFILE
The datafile contains aggregate individual statistics for 67 NBA seasons. from basic box-score attributes such as points, assists, rebounds etc., to more advanced money-ball like features such as Value Over Replacement.
Take a look in
link:https://git.swarmlab.io:3000/llo/LabLearningObject/src/branch/master/data/nba_statistics_glossary[Glossary^]
for a detailed column description
ENVIRONMENT VARIABLE: LLO_DATAFILE
====

9
cat/0_Display_Content/q-info

@ -0,0 +1,9 @@
Try to run
[source,sh]
----
cat -n $LLO_DATAFILE | head -5
----
and see the Results!

6
cat/intro

@ -0,0 +1,6 @@
*cat* command is one of the most useful & important command used in Linux.
It is used to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files
In this *LO*, we will see the most used cat Commands examples in Linux.

28
index_cat.yml

@ -0,0 +1,28 @@
--- # Programming language
name: "cat"
base_url: "https://git.swarmlab.io:3000/llo/LabLearningObject/raw/branch/master"
author: "zeus"
intro: "intro"
0_Display_Content:
display_name: "Display_Content"
swarmlabservice: "os2"
info:
file: "0_Display_Content/info"
code:
lang: "bash"
exec: "/bin/bash"
file: "0_Display_Content/code"
data: "0_Display_Content/data"
options: ""
mimetype: "bash"
output:
log: "console"
mimetype: "bash"
challenge:
question: "0_Display_Content/q-info"
codehelp: "0_Display_Content/codehelp"
codeanswer: "0_Display_Content/codeanswer"
mimetype: "bash"
points: "" # ELO
output:
log: "bash"
Loading…
Cancel
Save