Questions tagged as 'shell'

1
answer

What's the difference between / bin / bash and / usr / bin / env bash?

I do not know much about shell script, I have always used /bin/bash , but I noticed other variations: #!/usr/bin/env bash #!/usr/bin/bash #!/bin/bash What's the difference between them? As far as I...
asked by 01.08.2016 / 18:00
2
answers

Difference from #! in the first line of a Python script

For a Python script to be run on a Linux / Unix-based operating system, it should start with the designated shebang ( #! ): #! /usr/bin/env python But followed by the same I've seen two different instructions used: #! /usr/bin/env...
asked by 09.04.2015 / 21:15
4
answers

How can I request a user confirmation in a bash file?

I need to display a message on the Console and ask for a confirmation. For example, ask the user to type SIM to continue, and check this.     
asked by 09.03.2014 / 21:43
2
answers

Using variable with the sed command

I have the following occurrence: DirUpload=/var/log find $DirUpload | sed 's/$DirUpload//g' The question is, how to use variable along with sed?     
asked by 11.10.2016 / 20:40
3
answers

How to remove the "4 980 Raphael" space between numbers only

I have a String "980 Rafael" and I would like to know how I will remove only the spaces that are between the numbers in shell script.     
asked by 14.03.2017 / 12:46
2
answers

What is and what is "2 & 1" for?

When we want to direct the output in order to execute a command without receiving any information, between which potential execution errors we use: meuComando >/dev/null 2>&1 Effectively with >/dev/null we are sending th...
asked by 25.03.2015 / 19:55
2
answers

Linux 32 or 64 bits? [closed]

How do I know if the linux I'm using is 32-bit or 64-bit? I need to know what the architecture of my kernel is and I'm new to linux, I'd like to know how to figure it out.     
asked by 28.10.2015 / 00:39
1
answer

How do I Debug BASH Scripts?

How can I debug bash scripts? In DOS from Microsoft I can use the @echo ON and @echo OFF. I would like to use something similar on Linux.     
asked by 18.03.2014 / 16:08
3
answers

How to run PHP in interactive mode?

How do I run php from the command line, without having to use a script as an argument. Example with script: > php index.php I already know how to execute a certain function or code like this: > php -r "echo 12346;" But is ther...
asked by 30.07.2015 / 17:21
1
answer

Mini Search Engine

I am doing a mini search system for urls that are stored in a .txt file, one per line, my problem is the performance issue because I have 5000 urls stored (only) and it is already slow in the search , on the server side I have: if(isset($_GET[...
asked by 05.08.2016 / 16:12