I am very new to Linux operating system and unable to install softwares necessary for my work. when i use the command Its showing the command setnev doesnot exist. How to set environment variable? I am using ubuntu 10.4 Please help! Answer setenv works only in the CShell. If you are using BASH then use the command export
How can I run a function from a script in command line?
I have a script that has some functions. Can I run one of the function directly from command line? Something like this? Answer If the script only defines the functions and does nothing else, you can first execute the script within the context of the current shell using the source or . command and then simply call the function. See
bash scripting: how to get item name on a radiolist using dialog
I need to make a radiolist in bash script using dialog interface, for example if I have the following list: I need when the user chooses an option and presses “ok”, my script could read the item’s name and not the item’s number. It is possible? Thanks! Answer You can put your expected results in an array:
Bash: add string to the end of the file without line break
How can I add string to the end of the file without line break? for example if i’m using >> it will add to the end of the file with line break: I would like to add yourText2 right after yourText1 Answer If your sed implementation supports the -i option, you could use: With the second solution you’ll have a
Basic Python Hello World Program Syntax Error [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 year ago. Improve this question
Connecting to WiFi using adb shell
I have all the details to connect to a particular access point. I have to use that access point only, so all I require is the command to do it. Answer You can add a network entry into the wpa_supplicant.conf yourself (or within your script) Essentially connect manually once, then do: and integrate the network entry into your script for
How to run a ./configure script inside makefile
I have tried the following: under this context What can I do to make this work? Answer What happens when you just do ./libpng/configure? Make sure the configure script is executable! (chmod +x ./libpng/configure)
How can I do congestion control for a UDP protocol?
I have a custom UDP protocol with multiple senders/receivers designed to send large files around as fast as possible. It is client/server based. How can I detect congestion on the LAN to slow the rate of UDP packets being sent? EDIT: please, no comments on the use of UDP whether it’s suitable or not. This protocol uses UDP but reassembles
Open All files named generator.yml in all subdirectories of current directory in gedit
I’m no expert at shell scripting so I just want a quick answer. I tried something like but It just doesn’t work because it’s just a stupid guess. So what’s the correct way? UPDATE: answers by Jaypal Singh , kev and Sorin were very helpful but kev’s answer covers more cases so I’m marking that correct. Answer Or
Doing a deep unrar of an archive using the unrar command in Linux
I use the following command to unrar all files in a rar-acrhive to a directory It works great and it ignores the directory structure inside the archive which is just what I want. How do I make it unrar all rar files inside the archive aswell if there are any? Answer Run find folder -name “*.rar” -exec unrar … “{}”