Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 02:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Bash Error: Segmentation Fault At Use Space Into Command

Discussion on Bash Error: Segmentation Fault At Use Space Into Command within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
pis30xd's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 73
Received Thanks: 53
Unhappy Bash Error: Segmentation Fault At Use Space Into Command

Code (Doesn't work):
Code:
#!/bin/sh
## Local de trabalho: /var/scripts/ ##
  ##################################

## Confs. ##
DEVICE="SMARTPLUG"
SV="TOGGLE_REQUEST"
DELAY="3"

## Directorios ##
LOGDIR="logs/${DEVICE}/"
LOGFILE="logs_smartplug.txt"
DIR="/usr/local/withus/var"
DIRMI="info/${DEVICE}"
## TEMP="temp/"

## CMD's ##
FUNC="${DEVICE}_${SV}"
CMD="edpredy --json ${DIR}/${FUNC}"
## COD_START ##

while IFS=: read idd mac
CMD2="${CMD}_${idd}_${mac}.json 0"

if [ "$idd" == '' ]
	then
		echo "Nao existem ids ou macs!"
		exit
fi

do

eval ${CMD2} ##>> ${LOGDIR}${LOGFILE}

##DEV##
echo "[DEV]Comando executado: ${CMD2} "
echo "--GET INFO--"
echo "ID: ${idd}"
echo "MAC: ${mac}"
##/DEV#
sleep ${DELAY}

done < ${DIRMI}/id-mac.txt

echo "All done!"

## COD_END ##
Result:


But if i remove a space (causing an error, but work):

Code:
...
CMD2="${CMD}_${idd}_${mac}.json0"
...
Result:


Thanks!
pis30xd is offline  
Reply

Tags
bash, developer, shellcode


Similar Threads Similar Threads
Segmentation fault, unnormal?
06/15/2013 - Metin2 Private Server - 0 Replies
Hey, nein es ist nicht die gleiche Frage, wie man das beheben kann. Aber irgendwie auch schon.. Ich hatte als letztes den npc_gemischtwaren.quest gelöscht um die Gemi von dem Mehrfachklick zu befreien. Vorher hatte ich schon für den Rüssi und Waffenhändler alles fertig eingestellt. Hatte auch eigentlich alles funktioniert aber auf einmal kommt jetzt immer der bekannte Screen, mehrere Segmentation fault, core dumps . Hm Nun gut habe versucht zu schauen wo das Problem liegt aber ich...
Segmentation Fault (Core Dumbed)
12/24/2011 - Metin2 Private Server - 0 Replies
Hello all epvpers.i have a bad problem on my server.every time i put a .quest file on /usr/profizocker94/game/share_data/locale/hongkong /quest and put the name on the hongkong_list it shows me that error.i dont know what to do(PROFIZOCKER94 FILES - HAMACHI SERVER) thanks :handsdown: tsogeo007
[HELP]0 0x08069e83 in ?? () Segmentation fault
12/07/2011 - Metin2 Private Server - 1 Replies
I run a root server with 2089 gamefile unstripped version. Game cores crashes often declaring segmentation fault, but no entry in syserr - syslog. When I try to debug the .core, with gdb, this is the output: GNU gdb 6.1.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no...
Segmentation fault in ubuntu
06/09/2011 - Metin2 Private Server - 2 Replies
Welcome! I have a VPS,and the VPS's Operation System Ubuntu. When i copy the metin2 server file and server mysql to SSH,i write:"./start.sh". And it's write: "No such file or directory" Image: http://kephost.hu/kep/2011/06/asd_4.jpg After i write: "cd auth" "./auth"
VPC - Make.sh segmentation fault
01/07/2011 - Metin2 Private Server - 22 Replies
Hi, wenn ich die Make.sh dateiausführen möchte in Virtual pc damit meine gmstuff.quest funktioniert, dann kommt imma eine fehler meldung: segmentation fault und das ganz oft Da manche schon gesagt haben das das an der Honkonglist liegt, habe ich die mal hier reinkopiert. gmstuff.quest levelup.quest



All times are GMT +1. The time now is 02:11.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.