Linux: sed: search, replace, delete, print

Word Replace

 sed ‘s/root/amrood/’

 sed ‘s/root/amrood/g’

 sed ‘s/root/amrood/’ | grep root

 sed ‘s/root/amrood/g’ | grep root

cat /etc/passwd | sed ‘s/root//g’

Delete Lines in the Output

cat /etc/passwd | sed ‘1, 5d’ |more

cat /etc/passwd | head

cat /etc/passwd | sed ‘1d’ | head

cat /etc/passwd | grep ‘sh$’

cat /etc/passwd | sed ‘/sh$/d’

Print:

cat /etc/passwd | sed -n ‘/root/p’

1. Libraries used for the project: Predict Future Stock Price using Graph Theory, Machine Learning and Deep Learning)

#import libraries

import os
import pandas as pd
import math

#Import Libraries for Graph, GNN, and GCN

import stellargraph as sg
from stellargraph import StellarGraph
from stellargraph.layer import DeepGraphCNN
from stellargraph.mapper import FullBatchNodeGenerator
from stellargraph.mapper import PaddedGraphGenerator
from stellargraph.layer import GCN

#Machine Learnig related library Imports

from tensorflow.keras import layers, optimizers, losses, metrics, Model
from sklearn import preprocessing, model_selection
from IPython.display import display, HTML
import matplotlib.pyplot as plt
%matplotlib inline
from tensorflow.keras.layers import Dense, Conv1D, MaxPool1D, Dropout, Flatten
from tensorflow import keras

import numpy as np

import networkx as nx

Operating Systems: Storage and File Systems

Ref: Internet, Google Images, Google Search

History of Linux

Ref:

Operating Systems: Components, OS User Interfaces

Ref: Internet, Google, Google Images.

Kernel, Shell, Operating Systems and Functionality of Operating Systems

Operating System Functionality

Ref: https://www.geeksforgeeks.org/introduction-of-process-management/

Hardware/Software/Operating Systems

Ref:

•Ref: https://www.uow.edu.au/student/learning-co-op/technology-and-software/operating-systems/

https://www.learncomputerscienceonline.com/operating-system/

•System Software: https://www.techtarget.com/whatis/definition/system-software

Difference Between System Software and Application Software

Ref: https://www.geeksforgeeks.org/difference-between-system-software-and-application-software/

Do cars have computers and operating systems inside?

Ref: Internet, Google, Google Images

Misc. on Power Shell Script

Misc. on Power Shell Script

How to read data from users?

Read-Host

How to write/print output data/text to the user:

Write-Output

How to Check if a file exists?

Test-Path $filePath

How to append data to a file?

Add-Content -Path $filePath -Value “x: $x, y: $y”

How to create a file?

New-Item -Path $filePath -ItemType File -Force

How to write content to a file?

Set-Content -Path $filePath -Value “x: $name, y: $age”

How to get a list of all files in a directory

$files = Get-ChildItem -Path $dirPath

How to find the size of a file?

$file.Length

How to append content to a file?

$content | Out-File -FilePath $outputFile -Append

How to Create a file and write content to it?

$content | Out-File -FilePath $outputFile