Questions tagged [shell]

A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion. Not only does it allows the user to run programs from a text interface, but frequently offers basic programming features such as variables, substitution, output redirection, and wildcards.

A shell is terminology for a command-line interpreter most commonly used with Unix-like operating systems, but also used to interact with GUI-based operating systems in a more granular fashion.

Not only does it allows the user to run programs from a text interface, but frequently offers basic programming features such as variables, substitution, output redirection, and wildcards.

The name was first used by Unix operating system for an interpreter used for command prompt, but currently the term shell refers to BASH(Bourne Again SHell) and other command prompt interpreters too.

1348 questions
0
votes
1 answer

left outer join 2 shell output on a common key column using bash

Is there a way I can do a "left outer join" for bash output from 2 different commands based on a common key column (ip address)? For various reasons, I would like to avoid saving the output from either commands into a file and using the filename as…
louis xie
  • 125
  • 1
  • 5
0
votes
2 answers

saving sql dump error in a file

I want to save error if error comes, into a file. But error not redirecting into file. I get below error and its not redirecting into file. mysqldump: Couldn't execute 'SHOW FIELDS FROM `v_comloc`': View 'nextgendev_new.v_comloc' references invalid…
addi jeo
  • 3
  • 2
0
votes
1 answer

/etc/profile[278]: ulimit: 1048576: limit exceeded [Operation not permitted]

[root@bteir airwide]# su - ins Last login: Wed Aug 12 22:31:40 CDT 2020 on pts/0 /etc/profile[278]: ulimit: 1048576: limit exceeded [Operation not permitted] ins ins> This log is kept on writing whenever I switch users. Please help to solve this.
0
votes
1 answer

Linux does STDOUT | STDIN piping write data to disk?

I was planning on passing encryption keys to zfs load-key pool/set through stdin. The keys passed are generated by another program in HEX format and dataset is configured to have keylocation=prompt, keyformat=hex so the key can be passed through…
0
votes
1 answer

Assign multiple home directories to same user during useradd

I am working on a project in which a junior developer needs to FTP files onto the server and work in two separate directories that are at the same level on the server. Is is possible to assign BOTH the directories as home directories so when he logs…
Nikster2014
  • 101
  • 1
0
votes
2 answers

Change linux shell

On my Centos7 Server I have different shells for my users. For example the terminal as root looks like: [root@hostname www]#. The terminal as a different user looks like bash-4.2$. If I type echo $0 to get the currently-used shell, I get /bin/bash…
Jonas Heinze
  • 43
  • 1
  • 9
0
votes
1 answer

How to stop a running shell script if it executes some dangerous operations?

I mean, how to dynamically stop a running shell script based on what operation it's doing. Because some dangerous commands such as rm, if using regex before running, some edge situations may escape, like #!/bin/bash name="" $name rm a.py will still…
milkice
  • 111
  • 3
0
votes
2 answers

Grep messages like trash - No such file or directory

my server was hacked, and I am now trying to locate all the "strange" files. I am running: find . -type f -name '*' | xargs grep -l "Mini Shell" This command is helping me a lot to find and delete malicious code. However this is also giving me a…
Pikk
  • 339
  • 1
  • 6
  • 19
0
votes
1 answer

Why is technically possible for init to be a shell script?

I'm currently studying the boot process and composition of the different aspects of a GNU/Linux system and I can't rationaly explain this thing : you can write init inside an initramfs file as a shell script . Init is supposed to be the first…
user2485710
  • 151
  • 1
  • 4
0
votes
1 answer

How do I issue a command only if an app is found?

I need some help with a bit of shell script. The code below works, and if sed is found then it continues with the script but if it doesn't exist it will exit. if ! [ -x "$(command -v sed)" ]; then echo "Error: sed is not installed, please…
0
votes
1 answer

How to separate variables using awk and append it to Text file using ansible

What I got as extra variable to ansible playbook is "CHOW_app/timmy_app1/johnn_app3/harper_app4/mona_app5". This is passed as single variable to the playbook. I have to separate it and save it in a text file in this format. REVOKE CHOW app REVOKE…
saffron
  • 143
  • 1
  • 3
  • 12
0
votes
1 answer

Capture client browser console using Shell and save it to a file

I want to find a way to capture a client browser console that is using my server, and save it to a file inside the server, is this possible using a shell script ?
logax
  • 129
  • 3
  • 14
0
votes
1 answer

Wich Shebang should you use in a shell sript?

Sorry, this is maybe a stupid question, but I am new to shell scripts. I have a file called oem-device-name.sh. I need to execute an external check for Zabbix: https://www.zabbix.com/documentation/5.0/manual/config/items/itemtypes/external The…
Jarne
  • 25
  • 1
  • 9
0
votes
1 answer

How to grep lines only with matched words in Linux

I have a little question. I have a list of processes. After this command ps aux | grep postgres I see postgres 1178 0.0 0.2 320064 27060 ? S Apr12 0:05 /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c…
Piduna
  • 541
  • 4
  • 12
  • 25
0
votes
2 answers

Bash & blocking processes

Could you help me with the Bash syntax to achieve the following? Run a blocking process without blocking execution of the rest of the script. Run a standard "non-blocking" process (e.g. lsof). "Rejoin" the blocking process so that ^C will stop that…
xyz
  • 501
  • 2
  • 7
  • 13