Questions tagged as 'shell'

2
answers

How to write environment variables between shell sections preferably without using a script

I use several shell sections, with different parameters to compile applications for multiple platforms, sometimes need to close a shell and open it again for some reason, a crash or another reason. I use scripts to keep the environment variab...
asked by 04.11.2016 / 13:54
3
answers

syntax error near unexpected token 'fi' Linux

I had to try to make a code to automate steamcmd but I always got this error syntax error near unexpected token 'fi' , could someone help me? Code: STEAMCMDDOWN="https://steamcdn-a.akamihd.net/client/installer/steamcmd_linux.tar.gz" STEA...
asked by 15.07.2016 / 17:03
1
answer

application for optimization support, shell command correction for mac

I'm wondering how to optimize the following shell command in Mac OSX in order to fulfill the function you want to basically copy all files xx folder to the xx2 folder: ditto $(mdfind xx1) ~/Desktop/xx2 or ditto $(mdfind -onlyin ~/...
asked by 04.07.2016 / 15:57
1
answer

Use cmd commands in scripts made to run in shell - cakephp 3.0

I was wondering if you have how to use native windows CMD commands, from scripts made to run in the cakephp shell. I already run tasks that run in cmd, but with the commands of the framework itself but would like to use other commands.     
asked by 31.05.2016 / 22:22
1
answer

Output redirect to variable with blanks

I'm doing a script where I want to capture a path to the name of a user's file and then use it, plus the extension, to redirect the output of a command. example: Insert path: ~/Videos/file I do this using " read -e path ", and then...
asked by 06.09.2015 / 22:09
1
answer

Go through multiple directories on Linux terminal

I have an algorithm that starts with a file. From this file, it generates several others. I need to get all the names of these generated files, to from them, rerun my algorithm. Basically I wanted to know how to do in Shell Script to go through...
asked by 05.10.2018 / 21:30
1
answer

Is there any protection to prevent dangerous commands in CentOS 7 from running accidentally?

I've been deleting all the files and directories in a specific directory on a Linux CentOS 7 and I came across the following situation: the danger of changing the command sudo rm -fR ./* by sudo rm -fR /* (Forgetting the endpoint bef...
asked by 15.09.2018 / 01:59