Most voted "shell" questions
This is a program that takes, interprets and executes user commands, appearing on the screen as a command line, represented by a command interpreter, which waits on the screen for user commands. " Shell" is also used to describe applications, including software that is "built around" a specific component, such as browsers and email clients that are themselves "shells" for HTML rendering engines.
Learn more…208 questions
Sort by count of
-
0
votes1
answer311
viewsHow to protect upload php files against shell script
How can I protect sending php files against shell script, knowing that I only accept one type of extension.
-
0
votes2
answers241
viewsHow to switch the #(fence) symbol by the $(dollar sign) in the terminal after switching user
I’ll be direct, because the title denotes part of my curiosity about the linux console. Explain In some distros like - xPud and Basiclinux3 no "HOME" support is only "ROOT" and ready! In the distro…
-
0
votes1
answer881
viewsCreating new users through Shell Script
I’m trying to create a shell script to add new users to the GNU/Linux system But without entering native commands like adduser or useradd in the script, it would be something in the nail. I have…
-
0
votes1
answer41
viewsscript called once but turns two processes
I have here a script to test a function in the background. When I spin is launched two processes and I do not understand why. One stops at the "Sleep 20", and the other wheel eternally. #!/bin/bash…
-
0
votes0
answers212
viewsHow to change environment variable path $HOME to another?
The intention is to load with you all "created or downloaded" files, and reassemble it in any Livecd distro, leaving it as the default directory. Note that, the essential in this logic of reasoning…
-
0
votes0
answers134
views"Non-blocking" process in PHP
a help.I have the following code. $output = shell_exec("php /sites/empresa/php/faturamento/gerar_fat_simulado.php ".$cliente.' '.$mes.' '.$ano.' '.$tipo); It runs through the shell a fairly…
-
0
votes2
answers537
viewsReplace files with sed
Hi, I have a problem I need to solve. I have a file that should be inserted exactly one column of another file, I’m trying as follows: cat $1 | cut -d ',' -f2 | tr "/" "-" | awk -F "-" '{print…
-
0
votes1
answer86
viewsAdd program to windows shell
I need to add a program to the windows shell to call it more comfortably. In the linux environment I usually create a soft link between the program and the program installation folder, follow an…
-
0
votes1
answer397
viewsError in passing parameter to a Shell Script
I am creating a script to take some images in the folder and with that generate another image, I am using Imagemagick, but the problem I am having is in passing one of the parameters of this script…
-
0
votes1
answer162
viewsinverse java Sort shell
personal I’m having a doubt, how to make descending reverse Sort shell. private static void shellsort(int v[], int n) { int i, j, aux, h = 1; do h = 3 * h + 1; while (h < n); do { h /= 3; for (i…
-
0
votes0
answers39
viewsShel Script [Tail] Return line at the end of each concatenated fichier
Long live, I have several files with the same headers. what I wanted is to copy the contents of all files inside 1 only but only with 1 header. I’ve managed to do this part with the code below head…
-
0
votes3
answers83
viewsHow can I display only the package names while being unpacked
The question that perhaps already have some answer, however I did not find. I’m kind of lost, I would say that a little confused even because what I’m asking I think I’ve done it in some…
-
0
votes3
answers68
viewsShell: download and unpack in a row
I tried to use wget with tar as follows wget -qO- [url] | tar xvf but I can’t get the expected effect. There are other ways to do this?
-
0
votes1
answer973
viewsConnect via SSH to another machine and run script
I am automating tasks and I am new in Python, so I would like your help because I need to run a Shell script on another machine and this command I need to give inside a Python code. I thought I’d…
-
0
votes1
answer937
viewsCrontab does not execute script
I’m trying to run a script by crontab of centos, I’m doing so: crontab -e then put: */1 * * * * root /home/websites/public_html/admin/functions/open.sh Obs: Before doing this, add permissions to the…
-
0
votes2
answers830
viewsFilter number of characters with SED or grep
I have a file with strings I need at first filter for example only lines that has 5 characters And in a second moment filter only those that have at least 2 characters repeated together Example:…
-
0
votes0
answers91
viewsDuplicate paths in $PATH environment variable
I have noticed that the paths I add to $PATH in my .bashrc duplicates appear when I open tmux (multiplexer terminal): export PATH=$HOME/miniconda3/bin:$PATH export PATH=$PATH:$HOME/Devel/bin If I…
-
0
votes1
answer325
viewsModule requests is imported into IDLE, but not into Thonny (the IDE I use)
I installed the module requests by Terminal with sudo pip3 install requests (I am using Mac) and managed to import it through the Interactive shell without problems in IDLE. But when I try to import…
-
0
votes1
answer55
viewsShell script detect Aps and Mac Address
My goal is to develop a script on Linux environment (Kali Linux) that Automatizes certain tasks such as while running, detect Access Points next showing me the intensity of the signal and the Mac…
-
0
votes0
answers75
viewsBash Shell - Script to get user-chosen URL’s
Good night, I have a question about a bash shell script that will return the URL’s present in a Reddit page, that is, in a subreddit. What I managed so far was to return the URL’s that are on a page…
-
0
votes1
answer73
viewsChoose how many lines you want to show in the output
I am trying to put a flag -n to be able to show in the output the number of lines desired by the user, having so far only been able to show the line number beside case "$1" in ## definir o…
-
0
votes0
answers106
viewsHow to restrict the operation of some Android buttons
I’ve been trying a few days, some alternatives to lock the buttons of a tablet and then I need them back to work. I’ll show you some ways I’ve done and which one is operating in the best way…
-
0
votes1
answer445
viewsHow to get the runtime of a program with shell script?
I am creating a basic script in which I would like to take the runtime of a program each time it is called in the script. #!/bin/bash for i in {1..15} do echo "Execucao $i" time ./meu_programa >…
-
0
votes1
answer190
viewsAdd expect variable
I would like to create a shell script connecting on the controller SPECK to insert the macAddres of customers, using expect, I really need to create a script to automate the process. Variables…
-
0
votes1
answer55
viewsShell Script for Postgresql Download
I am writing a code in Shell Script to download the source code of the last updated version of Postgresql checking the current version automatically. So based on that I did the following: created…
-
0
votes1
answer55
viewsMake Toast disappear while running root command
Long live, I have my phone connected to the computer and when I run root commands by the adb, a Toast always appears in the middle, is there any way to make these toats disappear? I remind you that…
-
0
votes1
answer81
viewsHow to run Shell With PHP using bash compiler
I’d like to know how to run PHP in the Shell, using the Bash. I tried it this way but make a mistake: #/usr/bin/php <?php echo 'Olá Mundo'; ?>…
-
0
votes0
answers212
viewsssh - error when connecting with 4linux
I have a little problem with ssh, I’m a beginner in linux and I’m doing a course on 4linux about the basics of Linux and so on... I’m at the cloud connect part via ssh. When I did it for the first…
-
0
votes1
answer131
viewsShell in C: Segmentation error and execve function, what’s wrong?
#include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <sys/wait.h> void…
-
0
votes1
answer58
viewsSomething like Getasynckeystate() for Linux systems, is there something similar?
I did a lot of research on the internet and couldn’t find something like Getasynckeystate() that isn’t in the windows.h library. Is there any library or path to follow that allows "direct" control…
-
0
votes1
answer414
viewsMysql commands in Shell Script
I am trying to make a routine to deploy an application, and I came across a problem in shell script, the mysql commands I can’t run inside it, but at the prompt work, which should be done? mysql -u…
-
0
votes1
answer26
viewsCompiling zookeeper client on a Solaris machine, libtool error
I’m trying to compile the client zookeeper 3.4.12c on a machine solaris, below are the steps I followed. unpack source code, enter zookeeper-x.x.x/src/c folder. make a ". /configure [OPTIONS]" to…
-
0
votes1
answer74
viewsHow to copy the largest folder file to another using bash shell?
Inside a directory with several subdirectories I can search all the files . py, see only which ones have datetime and show me only the largest of them. Using find, grep, ls and head, but when I try…
-
0
votes1
answer178
viewsForce a shell script to run in the terminal
The user will download the script from an internal website and run it. What I wanted was that after downloading the user take two clicks on the script and it runs and not open for editing. There is…
-
0
votes0
answers29
viewsmkvextract giving error in windows
I installed the MKVToolNix on my computer and put the folder in the environment variables. When using the MKVExtrac in the Arquivo.sh, it presents the following error: What could be causing this…
-
0
votes1
answer2444
viewsList installed print server printers from a remote station
I work in a company that has the following structure: Each city of my state has a headquarters with a server that is also print server, in it are the printers of this headquarters. I use the psexec…
-
0
votes1
answer262
viewsCommand to open the terminal in a specified folder
I am producing some scripts to prepare the desktop, and wanted to leave the terminal in a predefined folder. How to do this? I’ve tried using cd ./pasta_selecionada and cd pasta_selecionada, but…
-
0
votes1
answer61
viewsUse C in Shellscript
In Shell we can use within the script other languages like awk and sed, I wonder if it would be possible to use the C language, and if yes, as.
-
0
votes1
answer95
viewsrun python file list with shell script
My code: #!/bin/bash scriptspy =( '/scs/sp1.py', '/scs/sp2.py', '/scs/sp3.py', '/scs/sp4.py', '/scs/spweb.py', '/scs/sp11.py', '/scs/spservice.py', .... ) for i in scriptspy; do python3.7 $i; done…
-
0
votes2
answers130
viewsHow can I turn " to " in a bash script
I made a small script in Python that transformed a file .py in a Linux bash script, however, the quotes that are inside the Python file end up making the script not work. Is there any way I can turn…
-
0
votes0
answers28
viewsWindows does not find R environment variables running shinys by . bat(batch) or shell files
I have a Shiny saved on the network that I make available to users through shortcuts that run Shiny by shell on Windows (the shortcut is a file. bat on desktop to user) I have some access passwords…
-
0
votes1
answer78
viewsWebscrapping Soup + python export to txt and check with shell script
Greetings people, I’m here with a python code that brings me the milliseconds of the E-tax Note Sending ping from the E-tax portal in the NFC-e status portal as below : #!/usr/bin/env python # -*-…
-
0
votes0
answers24
viewsShell - Enter or put program into variable
I have the following code: for (( c=1; c<=10; c++ )) do cc stringalea.c -o st aux = ./st $c echo $aux ... done The stringalea. c program returns a pseudo-random word of length "c". How do I enter…
-
0
votes1
answer64
viewsLinux - incorrect result with find and xargs command
I’m trying to list the files of the last day, but through the command below it lists the files of the last day and then starts to list all the files: [oracle@orcl11 adump]$ find . -ctime -1 | xargs…
-
0
votes2
answers126
viewsFormat file . csv in bash
I have the following problem: I copied the data from an Internet table into a text file. The goal is to turn this file to the default. csv in English (comma separated and decimal separator being the…
-
0
votes1
answer199
viewsProblem with variables that receive content from a shell command
I have a problem in a shell script I’m using for a test for a future task. The script is simple... I have a text file that has 2 columns with the delimiter ";". In the first column there are…
-
0
votes1
answer26
viewsMake Shellscript act as pipLine
How can I get my script to act in a pipeline example: ls|./meuScript|grep 'Mensagem Qualquer' what './meuScript' has to have to act as a filter ?
-
0
votes0
answers48
viewsLocation Path no shell windows 10
I want to know the path of Visual Studio Code to update a Docker in an application (Rainmeter), for this it is necessary to update the skin in a notepad, I came across the following parameters and…
-
0
votes0
answers41
viewsTerminal does not start with Visual studio code
Error received when trying to open terminal: The terminal process failed to start the path to the shell executable (zsh) is not a symlink file. The OS is Ubuntu.…
-
0
votes2
answers141
viewsHow to group substrings in condition and return them with BASH_REMATCH
I need to split a file-named string, in 5 parts, as an example below: #!/usr/bin/env bash str="python-zope-proxy-4.3.5-1-x86_64.chi.zst" pkg_re='(.+)-[^-]+-[0-9]+-([^.]+)\.chi.zst*' [[ $str =~…