Questions tagged as 'shell-script'

1
answer

Get JSON values using Shell script

I need to list the values of the number and url fields using the json shell script below: [{ "numero": "001", "local": "brasil", "url": "http://brasil.com.br", "ipv4": "10.10.0.1" }] I'm using this here: curl -s 'http://bras...
asked by 04.10.2016 / 21:32
1
answer

enter bash commands no expect

Good evening guys, I have an activity to do that needed me to use Expect to remove the user interaction in an SMTP communication. So in the body of the email I need to add the current date and size of a file. the code is like this #!/usr/bin/e...
asked by 28.08.2016 / 05:31
0
answers

How to compile a project with Android.mk via a script.sh?

I have a simple project with native code and I'm using the manual command to compile /workspace/android-ndk-r11c/ndk-build TARGET_PLATFORM=android-14 TARGET_ARCH_ABI=armeabi NDK_PROJECT_PATH=. . In my project I have Android.mk LOCAL_P...
asked by 20.06.2016 / 05:31
1
answer

Extract information from a text file with shell script and regular expressions

I want to make a script with a shell script that extracts from an emoticons text file, for example ;) , :) , :3 , :( , xD and also count the emoticons of each sentence. A statement is declared positive if the sum o...
asked by 09.11.2015 / 20:53
1
answer

How to recover a file deleted by the "rm" command? [closed]

I accidentally deleted a file using the command rm . Is there any way to recover it?     
asked by 11.12.2015 / 15:34
1
answer

The Classpath of my shell script could not find a particular jar

I have a shell script that performs the following statements: #!/bin/bash java -Dcom.sun.management.jmxremote -classpath .:lib/* br.com.governa.admin.sincronizador.negocio.Sincronizador config/sincronizacao-espec-transparencia.xml Time that...
asked by 15.04.2015 / 20:35
2
answers

How to get the local ip in shell-script?

I'm doing a script that needs the IP of the machine on the network, tried in many ways without success until I discovered a way: ip="'ip addr show | grep global | grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|2...
asked by 07.08.2017 / 04:21
2
answers

Filter number of characters with SED or grep

I have a file with strings I need at first to filter for example only rows that have 5 characters And secondly filter only those that have at least 2 characters repeated together Example: Display aazyx or zyaax but does not display azyxa And thi...
asked by 22.11.2017 / 00:47
3
answers

Validate zip code in Shell-Script

I am entering this world of regular expressions, I am with a doubt, I read about the metacharacters, etc. Well, I'm trying to validate a zip code and I'm using the following command and I'm not getting it ... I've already replaced \ d with [0-9]...
asked by 17.06.2015 / 15:22
2
answers

How to check if a server is in .ssh / known_hosts?

I have a script that syncs git repositories. If the repository has never been synchronized, the directories are created. Eventually, when a repository is added, the server that serves the repository is not listed in the .ssh/known_hosts...
asked by 24.09.2014 / 23:00