It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. If I have a file wit…
how can i read data from a file in expect script
I looked through this code online but will it read data if it is arragnged in 2 columns like. and so on I would like to assign each TFTP_SERVER_ADDRESS to a variable and use it in my script. furthermore,Is this piece of code secure : Answer Sample Script that reads data from a file and then calls an expect sc…
standard function to translate iso-639 codes to language name?
I guess there should be some standard method for this, just to avoid everybody retyping dull constants for their applications. 😉 I am looking for a function (usable in a php web app on linux) that can take two ISO639 language codes and returns the name of the first language in the second language, i.e. foo(&#…
Are mlock()-ed pages static, or can they be moved in physical RAM?
According the the mlock() man page: All pages that contain a part of the specified address range are guaranteed to be resident in RAM when the call returns successfully; the pages are guaranteed to stay in RAM until later unlocked. Does this also guarantee that the physical address of these pages is constant …
Why XGrabKey generates extra focus-out and focus-in events?
Does anyone know an xlib function to trap a keypress event without losing the original focus? How to get rid of it? (or “to use XGrabKey() without generating Grab-style focusout”?) (or “How to get rid of NotifyGrab and NotifyUngrab focus events at system level?) The XGrabKey will lose focus …
how to give more than one c file as input to GNU Cflow?
I was able to generate the callgraph of one file using gnu – cflow, but I was not able to find out how to generate the call graph for multiple files using cflow. I tried following cflow test.c,hello.c It generates the callgraph for test.c and not creating it for hello.c cflow test.c hello.c It generates…
Linux: Use parameter as file shortcut
Cheers everyone 🙂 I’m trying to make a linux script. This script shall be called with one parameter, a file stored in my home directory. I can’t seem to use So i have this variable $var1 and I want to save it in a file that does exist and its name is given in $1 Anyone help me please! Answer
connect() returns “Operation now in progress” on blocking socket?
I have a blocking socket (at least it appears so in following code): And this is from log: Mar 6 10:42:04 tcpclient: fcntl ret=0, ret & O_NONBLOCK = 0 Mar 6 10:42:04 tcpclient: after select fcntl ret=0, ret & O_NONBLOCK = 0 Mar 6 10:42:14 tcpclient: authenticate: error on connect -> Operation now i…
How to read a property value of json file located local on Ubuntu Terminal
I have a json file like below: and how can I read this value on Ubuntu Terminal. Answer You didn’t mention which version of ubuntu but as a 1 liner from the terminal this works for me (assumes json file is in same directory and called json_file.json)
What should TCP/IP do if one computer changed its IP address which we are sending data to?
What’s the standard behavior of TCP/IP protocol stack when a computer which we are sending data to suddenly changed its IP address? When this happens, the ARP table in our system is out of date, but the entry for this IP is not timed out? Is there a way to discover the new IP-mac mapping or we simply dr…