Questions tagged as 'shell-script'

1
answer

How to treat avariety in bash?

I'm having a problem, I'm doing a bash script to run using crontab, which syncs my ssd files with the hd and dropbox. Script: #!/bin/bash - PC_DIR="~/Programming" DROP_DIR="~/Dropbox/Programação" PC_FILES="$(find ${PC_DIR} -follow)" DROP_...
asked by 20.12.2017 / 04:40
1
answer

Shell Script for file and directory localization

I would like someone to help me create this script correctly, in case it is to create a script that you type the name and directory of a file and then indicate if it was located or not and that generates this type of output on the screen $ ....
asked by 13.04.2017 / 18:53
1
answer

Compare files from a directory with md5sum and shellscript

Good morning! I'm studying shellscript and an exercise asks for a scan of files in the current directory and md5 hashes to be computed. It also asks that if there are identical files by comparing hashes, these files are printed. The code I wa...
asked by 29.03.2017 / 15:43
3
answers

Transform date format DD / MM / YY in MM / DD / YY in Shell Script

The script reads the date of a .txt in DD / MM / YY format, and needs to convert it to MM / DD / AA format with Bash, Sed, or AWK.     
asked by 14.10.2016 / 00:12
2
answers

Insert string in first column

I'm breaking my head with something very simple, I need to insert a ";" (semicolon) after a sort / uniq in a file. As the number of repeated rows returns, I need this return that is always in the first column to be inserted this ";". I already s...
asked by 03.03.2017 / 20:32
2
answers

Error in using aliases and read in ShellScript

I'm trying to create a command in the .bashrc of ubuntu, however I'm having a problem, I'm trying to create a folder with the variable entered at the time of calling the alias, but this is giving an error. When I open the terminal it already ask...
asked by 20.02.2016 / 17:14
1
answer

Date and Computer Language Shell Script

Is there a shell script function that takes the date and time (time zone) and language that are configured on the computer?     
asked by 08.12.2015 / 18:30
1
answer

Retrieve arguments passed via ARGV in the terminal

I have a make file. Inside this make file, I call this file that has this: set -f; echo $1 | bc I want to retrieve the value of the function in C for this makefile. Example: ./a.out "12 + 12" result: 24     
asked by 11.11.2017 / 08:39
2
answers

Script to shut down the computer when closing a certain program

How do I create a script so that when the rdesktop window is closed the computer shuts down?     
asked by 18.03.2015 / 20:47
3
answers

Run a Script Shell with double click on Ubuntu

I have a program in Shell, it does the installation and configuration of some programs in Ubuntu, I wanted to know how to compile it or make it run when the user double-clicks it, yesterday I had found a C program that does this, but I lost the...
asked by 21.08.2015 / 00:34