Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Dedalus
Forum: Programming 04-25-2013
1,297
Posted By Dedalus
Json dissect with python
hello,

I'm trying to parse a json file and print out each element along with some related infos such type and value.

I would like to do that in python and I found a nice support to quickly load...
1,949
Posted By Dedalus
Cool thanks! it works
Cool thanks! it works
1,949
Posted By Dedalus
perl dot escaping issue
Hello,

I'm trying to figure out why this perl command does not work.
I want to split a string on dot delimiter.
If I try with colon the result is fine:

> echo -n "hello:world" | perl -F/:/...
Forum: IP Networking 05-29-2012
1,511
Posted By Dedalus
Routing, virtual iface tunnel
Hi all,

I need help to solve a routing problem.
I have a pc connected to Internet and I would like to create on it 2 virtual iface where the traffic is tunnelled.

The goal is that my...
6,189
Posted By Dedalus
bash: find multiple types[solved]
Hi,

I would like to use find to search for multiple types. For example search for symlink and regular file but not directories, sockets etc.... Something like:


find . -type l,f -name "stuff"...
1,316
Posted By Dedalus
ok thx :)
ok thx :)
1,316
Posted By Dedalus
Hi thx for reply, Yea actually I know that...
Hi thx for reply,

Yea actually I know that but this means that also your code,
if it include (even only few lines of code or simply the same modus operandi), must be released with the same...
1,316
Posted By Dedalus
Copyright question
Hi

I hope this is the right section to post.
My question is about copyrighted code.

If I read some copyrighted source code to learn something new and then I would like to reuse one idea I...
12,878
Posted By Dedalus
SOLVED:Testing privileges
Hi all,

Here I report the solution I found.
My goal was to test some user privileges and be sure that they can't start/stop/restart some services. My problem was that running the test for an...
15,789
Posted By Dedalus
Hi you missed a couple of things, try with these...
Hi you missed a couple of things, try with these corrections:


#Here the command to execute

output=$?
echo $output
if [ "$output" -eq "0" ]
then
echo "header in flat file exist"...
754
Posted By Dedalus
sorry that's not the only error.You should also...
sorry that's not the only error.You should also change it like that:


#! /bin/bash

string=$1
if [ "$string" = "red" ]; then
echo "blue"
elif [ "$string" = "blue" ]; then
echo "red"
else...
754
Posted By Dedalus
Hi, you should run it like that: ...
Hi,

you should run it like that:


./script.sh red

or

./script.sh blue


correction below
12,878
Posted By Dedalus
Hi, thx for reply. This script is really...
Hi,

thx for reply.
This script is really basic here there's the section I was talking about:


RC=0
for command in ${forbidden_command_array[@]}; do
$command
RC1=$(($?-EXP_RET_CODE)) ...
12,878
Posted By Dedalus
Testing privileges -lock lockfile /var/lock/subsys/..- Permission denied
Hi all,

I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...).
I'm trying to automate it with a shell script but in...
15,728
Posted By Dedalus
Hi Thanks for reply, I figure out also another...
Hi
Thanks for reply, I figure out also another way:
just add double quote to the array

array_test=("hello world+sunny")

hello world
sunny
15,728
Posted By Dedalus
Array and field separator
Hi all,

I have an array in BASH and I need to change the IFS in order to split up it correctly.
Here an example:

array_test=(hello world+sunny)

for elem in ${array_test[@]}; do
echo...
683
Posted By Dedalus
Thanks a lot
Thanks a lot
683
Posted By Dedalus
[SCRIPT] read and substitution
Hi all,

Actually I have a huge bash file like:


port1=$PORT && if [ $port -eq "$NUM"]; then .....
....stuff
port2=$PORT && if [ $port -eq "$NUM"]; then .....
...stuff
port3=$PORT && if [...
1,257
Posted By Dedalus
That's great! Thanks a lot
That's great!

Thanks a lot
1,257
Posted By Dedalus
Give actual pid as argument
Hi,

I run a command in the shell that run another process. I need a way to provide the command's pid to the subprocess. For instance, if I run the command foo:

foo process_to_run -p foo's_pid
...
Forum: Programming 11-24-2010
2,653
Posted By Dedalus
I'll do Thanks for help D.
I'll do

Thanks for help

D.
Forum: Programming 11-24-2010
2,653
Posted By Dedalus
yea sorry, I meant that I would like to...
yea sorry,

I meant that I would like to evaluate the load that a given process bring to the CPU but not in percent.
I'm giving a look around and found that I should refer to user time, system...
Forum: Programming 11-24-2010
2,653
Posted By Dedalus
CPU usage
Hi all,

I'm using python and psutil a library to get system informations like cpu usage (percent) for a given process.
My question is if I have the value in % of the cpu usage how I could get...
Forum: Ubuntu 11-19-2010
6,202
Posted By Dedalus
svn keyrings
Hello,

I have a svn account and can use it easly trought Web browser
inserting username and passwd.
But I get problems when I wanna do the same via shell,
here the output that I get:

svn...
Forum: Programming 11-13-2010
6,074
Posted By Dedalus
Python, struct.pack
Hello,

I found some code on line.
Is a python function that bring up an Internet interface, here the code:

# Get existing device flags
ifreq = struct.pack('16sh', 'wlan0', 0)...
Showing results 1 to 25 of 100

 

Featured Tech Videos

All times are GMT -4. The time now is 03:54 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy