Hi guys,
I need help on some function replacement cause I get obsolete function warning(and I must remove it):
-gethostbyaddr(arg1,arg2,arg3)
-gethostbyname(arg1)
-getservbyname(arg1,arg2)
can be replaced with getaddrinfo(arg1,arg2,arg3,arg4) but I'm not able to undestand how(libraries #include <sys/socket.h> #include <netdb.h>)
-inet_ntoa(arg1) to inet_ntop(arg1,arg2,arg3) <arpa/i
Hi all,
Now my problem is with a bash script which I managed to cook up with the help of angry_jhonny.
I just discovered that zenity support html tags
zenity --error --text "hello <b>world</b>"
but how to make it work with "entry" type ?
zenity --entry --text "hello <b>world</b>"
it's printing tags instead of interpreting them
Hey Guys,
I have a program that populates a database based on input I feed it.
so it would look like:
cmd arg1 arg2 ... argN
Now some of the arguments have special characters in them so I wrote a small script to pull the args and wrap them in quotes ('arg'). The problem is sometimes the characters can be quotes.
Trying to implement search functionality in list view having problem in search,here i am placing code where i am getting error
friendsearch.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) {
// When user changed the Text
FriendsActivity.this.adapter.getFilter().filter(cs);
in the abo
I am going to show an error window using zenity:
/usr/bin/zenity --error --text="my error message"
The error text to pass is obtained as output from another application. This output may contain quotes, backslashes and other special symbols which could prevent zenity to start correctly.
/usr/bin/zenity --error --text=$(/usr/bin/some-application)
### e.g.
or without a catfish, work in progress, requires locate;guilocate#!/bin/bash
somestring="$(zenity --entry --text="" --title search --width=350)" &&
locate $somestring | zenity --text-info --width=650 --height=600I would prefer to send a filelist back to thunar if possible?
Hi All,
I want to pass few dynamic arguments to shell script. The number of arguments differ each time I call the script.
I want to print the arguments using the for loop as below. But not working out.
Code:
for (( i=1; i<=$#; i++ ))
do
echo $"($i)"
done
Code:
/bin/sh test.sh arg1 arg2 arg3
Any one please help.
I want to run a python script at boot as a particular user.
The script is a server (listens on a socket, serves requests, etc) and should be run in the background, with any output preferably piped to a log file.
My current approach is to add an entry at the end of rc.local like this:
su -l usr -c 'script.py arg1 arg2 &> logfile.log &'
The problem: In the script i have several print sta