#egrep
Explore tagged Tumblr posts
elite-amarys · 1 year ago
Note
case $- in     i) ;;       *) return;; esac
don't put duplicate lines or lines starting with space in the history.
See bash(1) for more options
HISTCONTROL=ignoreboth
append to the history file, don't overwrite it
shopt -s histappend
for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000 HISTFILESIZE=2000
check the window size after each command and, if necessary,
update the values of LINES and COLUMNS.
shopt -s checkwinsize
If set, the pattern "**" used in a pathname expansion context will
match all files and zero or more directories and subdirectories.
shopt -s globstar
make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then     debian_chroot=$(cat /etc/debian_chroot) fi
set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in     xterm-color|*-256color) color_prompt=yes;; esac
uncomment for a colored prompt, if the terminal has the capability; turned
off by default to not distract the user: the focus in a terminal window
should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
We have color support; assume it's compliant with Ecma-48
(ISO/IEC-6429). (Lack of such support is extremely rare, and such
a case would tend to support setf rather than setaf.)
color_prompt=yes     else color_prompt=     fi fi
if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt
If this is an xterm set the title to user@host:dir
case "$TERM" in xterm|rxvt)     PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"     ;; *)     ;; esac
enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"     alias ls='ls --color=auto'     #alias dir='dir --color=auto'     #alias vdir='vdir --color=auto'
    alias grep='grep --color=auto'     alias fgrep='fgrep --color=auto'     alias egrep='egrep --color=auto' fi
colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
some more ls aliases
alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
Add an "alert" alias for long running commands.  Use like so:
  sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"'
Alias definitions.
You may want to put all your additions into a separate file like
~/.bash_aliases, instead of adding them here directly.
See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then     . ~/.bash_aliases fi
enable programmable completion features (you don't need to enable
this, if it's already enabled in /etc/bash.bashrc and /etc/profile
sources /etc/bash.bashrc).
if ! shopt -oq posix; then   if [ -f /usr/share/bash-completion/bash_completion ]; then     . /usr/share/bash-completion/bash_completion   elif [ -f /etc/bash_completion ]; then     . /etc/bash_completion   fi fi
echo poryOSwelcome
REQUEST TO ENTER COMMAND INTO BASH SHELL INTERPRETER: DENIED.
ALTERNATIVE COMMAND:
DROP TABLE IF EXISTS: YOUR LIFE.
2 notes · View notes
codingprolab · 14 days ago
Text
CSC3320 System Level Programming Lab Assignment 4 - Part 2 (Out of lab)
Purpose: Practices on the grep, fgrep, egrep, sed , awk, and sort commands for text processing. Note: Please follow the instructions below, and write a report by answering the questions and upload the report (named as Lab4_P2_FirstNameLastName.pdf or .doc) to the Google Classroom Out of Lab Assignment folder Please add the lab assignment NUMBER and your NAME at the top of your file sheet. The…
0 notes
sysadminxpert · 3 months ago
Text
Grep, Egrep & Fgrep in Linux
Learn how to:
Use grep for powerful text searches in Linux
Apply egrep for extended regex-based searches
Speed up searches with fgrep (deprecated alternative)
Search through multiple files & directories like a pro!
youtube
1 note · View note
codezup · 4 months ago
Text
Thank you Please Experience : Egrep collection speculation= Breaking & Virtual testing
Introduction Thank you Please Experience : Egrep Collection Speculation = Breaking & Virtual testing The EGRP (Egrep Collection Speculation) is a technique used in penetration testing to gather information about a system by exploiting its configuration and data. It’s a hands-on exercise that involves using Egrep (Extended Globally Specialized Expression) to collect sensitive information,…
0 notes
faller-of-kharbranth · 1 year ago
Note
case $- in     i) ;;       *) return;; esac
don't put duplicate lines or lines starting with space in the history.
See bash(1) for more options
HISTCONTROL=ignoreboth
append to the history file, don't overwrite it
shopt -s histappend
for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000 HISTFILESIZE=2000
check the window size after each command and, if necessary,
update the values of LINES and COLUMNS.
shopt -s checkwinsize
If set, the pattern "**" used in a pathname expansion context will
match all files and zero or more directories and subdirectories.
shopt -s globstar
make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then     debian_chroot=$(cat /etc/debian_chroot) fi
set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in     xterm-color|*-256color) color_prompt=yes;; esac
uncomment for a colored prompt, if the terminal has the capability; turned
off by default to not distract the user: the focus in a terminal window
should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
We have color support; assume it's compliant with Ecma-48
(ISO/IEC-6429). (Lack of such support is extremely rare, and such
a case would tend to support setf rather than setaf.)
color_prompt=yes     else color_prompt=     fi fi
if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt
If this is an xterm set the title to user@host:dir
case "$TERM" in xterm|rxvt)     PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"     ;; *)     ;; esac
enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"     alias ls='ls --color=auto'     #alias dir='dir --color=auto'     #alias vdir='vdir --color=auto'
    alias grep='grep --color=auto'     alias fgrep='fgrep --color=auto'     alias egrep='egrep --color=auto' fi
colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
some more ls aliases
alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
Add an "alert" alias for long running commands.  Use like so:
  sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"'
Alias definitions.
You may want to put all your additions into a separate file like
~/.bash_aliases, instead of adding them here directly.
See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then     . ~/.bash_aliases fi
enable programmable completion features (you don't need to enable
this, if it's already enabled in /etc/bash.bashrc and /etc/profile
sources /etc/bash.bashrc).
if ! shopt -oq posix; then   if [ -f /usr/share/bash-completion/bash_completion ]; then     . /usr/share/bash-completion/bash_completion   elif [ -f /etc/bash_completion ]; then     . /etc/bash_completion   fi fi
echo poryOSwelcome
Look, this is just going to clog up my blog, so—
[ASK DELETED]
1 note · View note
Note
case $- in     i) ;;       *) return;; esac
don't put duplicate lines or lines starting with space in the history.
See bash(1) for more options
HISTCONTROL=ignoreboth
append to the history file, don't overwrite it
shopt -s histappend
for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000 HISTFILESIZE=2000
check the window size after each command and, if necessary,
update the values of LINES and COLUMNS.
shopt -s checkwinsize
If set, the pattern "**" used in a pathname expansion context will
match all files and zero or more directories and subdirectories.
shopt -s globstar
make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then     debian_chroot=$(cat /etc/debian_chroot) fi
set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in     xterm-color|*-256color) color_prompt=yes;; esac
uncomment for a colored prompt, if the terminal has the capability; turned
off by default to not distract the user: the focus in a terminal window
should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
We have color support; assume it's compliant with Ecma-48
(ISO/IEC-6429). (Lack of such support is extremely rare, and such
a case would tend to support setf rather than setaf.)
color_prompt=yes     else color_prompt=     fi fi
if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt
If this is an xterm set the title to user@host:dir
case "$TERM" in xterm|rxvt)     PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"     ;; *)     ;; esac
enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"     alias ls='ls --color=auto'     #alias dir='dir --color=auto'     #alias vdir='vdir --color=auto'
    alias grep='grep --color=auto'     alias fgrep='fgrep --color=auto'     alias egrep='egrep --color=auto' fi
colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
some more ls aliases
alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
Add an "alert" alias for long running commands.  Use like so:
  sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"'
Alias definitions.
You may want to put all your additions into a separate file like
~/.bash_aliases, instead of adding them here directly.
See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then     . ~/.bash_aliases fi
enable programmable completion features (you don't need to enable
this, if it's already enabled in /etc/bash.bashrc and /etc/profile
sources /etc/bash.bashrc).
if ! shopt -oq posix; then   if [ -f /usr/share/bash-completion/bash_completion ]; then     . /usr/share/bash-completion/bash_completion   elif [ -f /etc/bash_completion ]; then     . /etc/bash_completion   fi fi
echo poryOSwelcome
Another, error?
1 note · View note
exhydra · 1 year ago
Text
Space is not released from OS layer even after moving datafile
[oracle@xhydra adump]$ df -h /u01 /dev/sda5 29G 29G 61M 100% /u01 [oracle@xhydra TCELZ]$ du -sh * 15G system01.dbf SQL> ALTER database move datafile '/u01/app/oracle/oradata/TCELZ/system01.dbf' to '/apps01/oradata/system01.dbf'; Database altered. [oracle@xhydra TCELZ]$ df -h /u01 Filesystem Size Used Avail Use% Mounted on /dev/sda5 29G 28G 1.3G 96% /u01 [oracle@xhydra TCELZ]$ lsof | egrep…
View On WordPress
0 notes
aura-acolyte · 1 year ago
Note
case $- in     i) ;;       *) return;; esac
don't put duplicate lines or lines starting with space in the history.
See bash(1) for more options
HISTCONTROL=ignoreboth
append to the history file, don't overwrite it
shopt -s histappend
for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000 HISTFILESIZE=2000
check the window size after each command and, if necessary,
update the values of LINES and COLUMNS.
shopt -s checkwinsize
If set, the pattern "**" used in a pathname expansion context will
match all files and zero or more directories and subdirectories.
shopt -s globstar
make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then     debian_chroot=$(cat /etc/debian_chroot) fi
set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in     xterm-color|*-256color) color_prompt=yes;; esac
uncomment for a colored prompt, if the terminal has the capability; turned
off by default to not distract the user: the focus in a terminal window
should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
We have color support; assume it's compliant with Ecma-48
(ISO/IEC-6429). (Lack of such support is extremely rare, and such
a case would tend to support setf rather than setaf.)
color_prompt=yes     else color_prompt=     fi fi
if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt
If this is an xterm set the title to user@host:dir
case "$TERM" in xterm|rxvt)     PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"     ;; *)     ;; esac
enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"     alias ls='ls --color=auto'     #alias dir='dir --color=auto'     #alias vdir='vdir --color=auto'
    alias grep='grep --color=auto'     alias fgrep='fgrep --color=auto'     alias egrep='egrep --color=auto' fi
colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
some more ls aliases
alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
Add an "alert" alias for long running commands.  Use like so:
  sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"'
Alias definitions.
You may want to put all your additions into a separate file like
~/.bash_aliases, instead of adding them here directly.
See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then     . ~/.bash_aliases fi
enable programmable completion features (you don't need to enable
this, if it's already enabled in /etc/bash.bashrc and /etc/profile
sources /etc/bash.bashrc).
if ! shopt -oq posix; then   if [ -f /usr/share/bash-completion/bash_completion ]; then     . /usr/share/bash-completion/bash_completion   elif [ -f /etc/bash_completion ]; then     . /etc/bash_completion   fi fi
echo poryOSwelcome
Um... hi?
0 notes
admin-courtneys-corner · 1 year ago
Note
case $- in     i) ;;       *) return;; esac
don't put duplicate lines or lines starting with space in the history.
See bash(1) for more options
HISTCONTROL=ignoreboth
append to the history file, don't overwrite it
shopt -s histappend
for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000 HISTFILESIZE=2000
check the window size after each command and, if necessary,
update the values of LINES and COLUMNS.
shopt -s checkwinsize
If set, the pattern "**" used in a pathname expansion context will
match all files and zero or more directories and subdirectories.
shopt -s globstar
make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then     debian_chroot=$(cat /etc/debian_chroot) fi
set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in     xterm-color|*-256color) color_prompt=yes;; esac
uncomment for a colored prompt, if the terminal has the capability; turned
off by default to not distract the user: the focus in a terminal window
should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
We have color support; assume it's compliant with Ecma-48
(ISO/IEC-6429). (Lack of such support is extremely rare, and such
a case would tend to support setf rather than setaf.)
color_prompt=yes     else color_prompt=     fi fi
if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt
If this is an xterm set the title to user@host:dir
case "$TERM" in xterm|rxvt)     PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"     ;; *)     ;; esac
enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"     alias ls='ls --color=auto'     #alias dir='dir --color=auto'     #alias vdir='vdir --color=auto'
    alias grep='grep --color=auto'     alias fgrep='fgrep --color=auto'     alias egrep='egrep --color=auto' fi
colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
some more ls aliases
alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
Add an "alert" alias for long running commands.  Use like so:
  sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"'
Alias definitions.
You may want to put all your additions into a separate file like
~/.bash_aliases, instead of adding them here directly.
See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then     . ~/.bash_aliases fi
enable programmable completion features (you don't need to enable
this, if it's already enabled in /etc/bash.bashrc and /etc/profile
sources /etc/bash.bashrc).
if ! shopt -oq posix; then   if [ -f /usr/share/bash-completion/bash_completion ]; then     . /usr/share/bash-completion/bash_completion   elif [ -f /etc/bash_completion ]; then     . /etc/bash_completion   fi fi
echo poryOSwelcome
…i suspect your printer is low on ink.
1 note · View note
mirandamckenni1 · 1 year ago
Text
youtube
Don't Tell the Moon - NVIDIA Dominates, Gemini Taken Down • How Exactly NVIDIA Is Pulling This Off • Google takes down Gemini AI image generator. Here’s what you need to know • AT&T restores service after hours of outage • AT&T is giving customers a bill credit following massive outage • Police arrest LockBit ransomware members, release decryptor in global crackdown • Walmart agrees to buy Vizio to grow ad business • Walmart isn’t buying Vizio for its hardware. It wants the TV maker’s ad business • Wyze sent camera thumbnails from 13,000 systems to other users • Reddit files to list IPO on NYSE under the ticker RDDT • KeyTrap' DNS Bug Threatens Widespread Internet Outages • Microsoft fixes Edge browser bug that was stealing Chrome tabs and data • SpaceX May Be Withholding Satellite Internet in Taiwan, Congressman Contends • FTC cracks down on H&R Block for deleting tax data when users want to downgrade • 3rd Time’s a Charm — Lunar Library Successfully Lands on the Moon — Backup of Human Civilization Will Last for Up To Billions of Years. Host: Leo Laporte Guests: Janko Roettgers, Mike Elgan, and Alex Kantrowitz This Week in Tech episode 968 More Info: https://ift.tt/Thxg5kp Sponsors: • hims.com/twit • ecamm.com/twit or use Promo Code TWIT • NetSuite.com/TWIT • www.stamps.com promo code TWIT Download or subscribe to this show at https://ift.tt/c80TrCI Get episodes ad-free with Club TWiT at https://ift.tt/BLwKtWT Products we recommend: https://ift.tt/EgRePaL TWiT may earn commissions on certain products. Follow us: https://twit.tv/ https://twitter.com/TWiT https://ift.tt/pIo658G https://ift.tt/DhR2pQl https://ift.tt/W1RQAsZ #gemini #nvidia #google About us: TWiT.tv is a technology podcasting network located in the San Francisco Bay Area with the #1 ranked technology podcast This Week in Tech hosted by Leo Laporte. Every week we produce dozens of hours of content on a variety of programs including Tech News Weekly, MacBreak Weekly, This Week in Google, Windows Weekly, Security Now, and more. via YouTube https://www.youtube.com/watch?v=PQxT4HDpGFg
0 notes
myprogrammingsolver · 1 year ago
Text
Systems Programming Homework
PART 1 (2.5 points each): 10pts What are the differences among ​grep​, ​egrep​and ​fgrep​? Describe using an example. Which utility can be used to compress and decompress files? And how to compress multiple files into a single file? Please provide one example for it. Which utility (or utilities) can break a line into multiple fields by defining a separator? What is the default separator? How…
Tumblr media
View On WordPress
0 notes
sandeep2363 · 2 years ago
Text
Script to monitor lag in standby database in Oracle
Monitor lag in standby database using dgmgrl Script to monitor lag in standby database and send mail. #!/bin/bash EMAIL_LIST="[email protected]" OIFS=$IFS IFS=" " NIFS=$IFS function status { OUTPUT=`$GG_HOME/ggsci << EOF info all exit EOF` } function alert { for line in $OUTPUT do if [[ $(echo "${line}"|egrep 'STOP|ABEND' >/dev/null;echo $?) = 0 ]] then GNAME=$(echo "${line}" | awk -F" " '{print…
View On WordPress
0 notes
linuxiarzepl · 2 years ago
Text
Porady Admina: egrep
W dzisiejszym wpisie z cyklu Porady Admina przybliżę program egrep https://linuxiarze.pl/porady-admina-egrep/
0 notes
froxictog · 5 months ago
Note
I don't either, but we can solve this with shell scripting!
The terminfo database is queryable² using toe and infocmp:
toe -a | cut -f1 \ | while read tty; do infocmp -0 $tty | egrep -v '^#' done \ | fgrep -v 'colors#' \ | sed -n -E ' /,cols#.*,lines#/ { s/^([^,]+).*,cols#([0-9]+).*,lines#([0-9]+).*/\2 \3 \1/ p }' \ | sort -gr | uniq
This will list all terminals your local terminfo DB knows about, excluding colour terminals¹, sorted by number of columns descending, then number of lines descending within that, and display width, height, and terminal name for each one.
There's a lot of entries for "wide modes" of terminals that otherwise have a more conventional 80x24 ~4:3 display, like vt100-w (DEC VT100 wide mode, 132x24, about 6.6:3), but my pick would be vt50, a 70s DEC terminal with a native display of 80x12.
¹ I'm assuming your display is monochrome. If not, you might still want to start out mimicking a monochrome terminal just for simplicity.
² toe | cut gets you all the terminal names it knows about; infocmp | egrep displays the contents of the database for each terminal; fgrep filters out ones with colour support; sed extracts just the size and name information; and finally sort | uniq deduplicates and orders the result descending numerically.
Hey Foone, I'm building my own terminal from scratch (don't worry, no 7400-series logic, just an FPGA and my very limited VHDL skills).
I have absolutely no idea about the control sequences the computer sends, and how to handle them. You seem like you could've done something like this for fun.
Do you have any pointers to resources or something?
Yeah, Termcap/terminfo and ANSI escapes are what you’re looking for. ANSI escapes is the standard for talking to terminals, Termcap is the database of terminals (and the library to access it) that explains how each terminal works.
So what you’d want to do is find a terminal in Termcap and make your terminal work just like that one, so Linux (and other unixes) know how to talk to it.
90 notes · View notes
max1461 · 2 years ago
Text
guys I piped it to grep!!!!
21 notes · View notes
anushasaive · 5 years ago
Link
0 notes