Hello DaniWeb / Linux Users and Programmers, I am 90% new to the world of Linux. I was instructed to edit a running program. The purpose of editing this program was to follow the format of the other running program. But it is hard for me to understand because some of the codes have like this: -u , -d , +%-H , -ud , $1 , etc... So I look on the internet but it show the basic commands not the exact meaning for the given example. anyone can tell me the meaning for it? for fast track... and also …

Member Avatar
Member Avatar
+0 forum 5

Hello All. I have a program that automatically restarts itself atfer a certain amount of time. I am doing this to test some things out. The program is wrapped in a jar. I run the jar from terminal with java -jar ProgramName.jar It will run and will output all the "System.out.println" outputs in terminal When the program restarts itself, It stops outputing on terminal. It runs fine and everything, I just want to see the output. How would I accomplish this. this is my restarting code. public void Restart() throws IOException { try { final String javaBin = System.getProperty("java.home") + …

Member Avatar
Member Avatar
+0 forum 2

Hello. I was looking for a tutorial or any example of creating web crawler that i found this code somewhere and copied and pasted to test it: First, it is a web crawler, right? Because when i gave it a url of a website, the output was some linkes were published on the terminal. Second, if you test it yourself, you will see that linkes will divided into some parts with the title `Scanning depth 1 web` and so on (the number will change). What is that for? What does it mean? What does depth number web means? Third, i …

Member Avatar
Member Avatar
+0 forum 5

Hello, me again :) With this code: >>> from BeautifulSoup import BeautifulSoup >>> import urllib2 >>> url = urllib2.urlopen('http://www.python.org').read() >>> soup = BeautifulSoup(url) >>> links = soup('a') >>> print links A list of links printed into the terminal. I want to send the list into a text file, i tried this: >>> with open('python-links.txt.', 'w') as f: ... f.write(links) But there was an error: File "<stdin>", line 2, in <module> TypeError: expected a character buffer object What is the problem? How can fix that? -------------------------------------------------------------------- And one more question; as that list looks like this: (I will copy only small …

Member Avatar
Member Avatar
+0 forum 3

I have 3 windows server 2008 r2 64 terminal servers in a farm should all have the exact information, but when a user logs in to the farm they will get onto one of the three servers on two of the servers the desktop is exactly the same but when the log into the last server the desktop is different any ideas greatly received.

Member Avatar
Member Avatar
+0 forum 2

Hello everybody. I need a quick help. I have a problem with running my python file code. I use Linux. I had a file with the name "app3.py" file on the Desktop; then i removed ".py" from the end of the name of the file; so now i have "app3" file. The first line of the file is this: #!/usr/bin/env python3 I have checked the "Execute: Allow executing file as program" checkbox too. I have typed this command on Linux terminal: sudo chmod +x app3 Now when i type "./app3" on the terminal; it should works but it doesn't. I …

Member Avatar
Member Avatar
+0 forum 4

Hello, I recently started using vim, and decided it was about time to check out some plugins. I am still not very familiar, so my problems could be related to that fact! I started by installing vundle and using it I have installed a few top rated plugins, when I use PluginList it shows the following: vundle, nerdtree, buffergator, powerline, snipmate, easymotion, surround, matchit, fugitive, alternate. I do not believe it is just surround that isnt functioning, as I do not see the powerline displayed either. I have confirmed that i have nerdtree, and its safe to say I have …

Member Avatar
Member Avatar
+0 forum 3

I am facing a problem with my terminal (Ubuntu 12.04 LTS) . I was making some changes in the /bin/bash , but I have keeped a backup of .bashrc in case of something went wrong. Anyway today I have tried to open my Terminal and the following message appeared: There was an error creating the child process for this terminal Failed to execute child process "/bin/bash" (Too many levels of symbolic links) What can I do in order to fix this problem or how can I reset my Terminal to defaults ?? Thanks In advance

Member Avatar
Member Avatar
+0 forum 5

To connect to a network using networksetup, we use `networksetup -setairportnetwork en0/1/2 <Network name> [Password]`. However, when the network uses WPA2 Enterprise, it needs a username. What should I do?

Member Avatar
Member Avatar
+0 forum 1

I'm currently having an assignment that wants me to copy a select amount of files. More specifically files that are even using the cp command. The assignment is to copy files that start with cp and are even. This was my command at first `cp[24680]*` but it returned all files that had an even number in it. I just want files that end in the even number. example I want to copy only these files: cp1250.enc cp1256.enc cp852.enc cp864.enc cp932.enc cp1252.enc cp1258.enc cp860.enc cp866.enc cp936.enc cp1254.enc cp850.enc cp862.enc cp874.enc cp950.enc. But the command I make gives me : cp437.enc cp852.enc …

Member Avatar
Member Avatar
+0 forum 2

How do Vim and Emacs allow the whole console to be used, even after an enter has been recieved? (this can be Windows-specific) I've got unbuffered input, and I have methods for output to print to anywhere in the console. What methods do Vim/Emacs employ to make the entire screen editable? I realize I won't be able to use streams, but I also can't understand how unbuffered input would do this either?

Member Avatar
Member Avatar
+0 forum 1

The simplest way is now friends with this command when running this sample compiled #include <stdio.h> #include "fcgi_stdio.h" int main(int argc, char *argv[]) { while(FCGI_Accept() >= 0) { printf("Content-Type: text/html; charset=UTF-8"); printf("<center><br><br>Hello World Wide Web</center>"); } return 0; } **operation type:** cgi-fcgi -start -connect localhost:9000 ./hello After you run this way, but threw reset the computer terminal screen turns off, so I stop when I say hello hello-s stop or How do I turn off compiled using the Unix operating system, the file "/ usr / local" directory to put under

Member Avatar
Member Avatar
+0 forum 4

How can I open an application on a specific workspace using the terminal in UNIX? **** I cannot use any external addons like Devil's Pie ****

Member Avatar
+0 forum 0

I installed zsh instead of bash and quite like it. However today I was changing the php path and I messed it up. I know what I did wrong, and I would just edit the file and fix it but my mistake has stopped any commands working. I could access it through finder, but the file I messed up on begins with a . so I need to run a terminal command so it shows up. Any ideas on what I could do?

Member Avatar
Member Avatar
+0 forum 1

So I wrote a cool little python script for terminal commands that I get sick of entering. Most of the script is explained in docstrings and comments. Looking for useful terminal commands or things I missed or could have done better. I'm actually quite proud of it. :) #!/usr/bin/env python '''Local refers to the host computer[127.0.0.1], System refers to the system, [run] runs the command in a host network enviroment.''' __default__ = "/" __pythondefault__ = "/Users/self/Desktop/Python3" __vers__ = 1.0 __auth__ = "SirPrinceKai" import os from fabric.api import * def Erase(): print "Removes the bits and pieces from your trash can." …

Member Avatar
Member Avatar
+1 forum 4

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. Here are some very basic examples on how to do for-loops in BASH. Edit: Fixed per Watael's suggestions.

Member Avatar
Member Avatar
+0 forum 1

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. Here are some very basic examples on how to do for-loops in BASH.

Member Avatar
Member Avatar
+0 forum 3

This is another useful script I came across. It prints a color-code chart in your terminal. It can help you find the color-code you are looking for, or view the current color-scheme you are using (people use it on reddit/r/unixporn to show off their system's theme, I use it to grab color codes). I figure someone may get some use out of this, and there aren't many "Shell Scripting" code-snippets, so I'll put it here.

Member Avatar
+0 forum 0

I didn't write this, the credits are in the code. It's a code-golf version, and I'm sorry about that. I am trying to 'decode' it but I don't have the skills, so the 'decoded' version doesn't have the right colors. This is an example of what you can do with BASH, or possibly other shells, and it's just a neat thing to see. So I offer this up for your amusement, I've tested it and combed through it to make sure there's no hidden tricks. As far as I can tell it only uses a few commands like `echo`, `printf`, …

Member Avatar
+0 forum 0

Hey everyone, So i've been doing some reasearch and I can't seem to find the answer to my problem anywhere. It could also be that I don't really understand the articles I find in google but I figured I'd ask here since everyone is always so helpful. So for a class we were told to design an app. Could be anything we wanted. So, being the twitter freak I am, i wanted to make a java twitter app. So i downloaded some libraries (TwitterJ4) but I don't know what to do with them. We are not allowed to use a …

Member Avatar
Member Avatar
+0 forum 1

I saw that github commands in linux terminal always uses word "git" before all it's commands. How to use my own word for my shell script? for example, $ git commit or $ git status

Member Avatar
Member Avatar
+0 forum 1

Hey all, Wanted to ask a question about the guest profile on Mountain Lion. I have always been a little insecure about changing and adding new feats to the terminal, so I'm trying to figure out a way that I can be *more* secure. I have recently edited both bash profile/rc to customize my needs. However, I think I want to take it a step further and start adding more elements to my environment. I'm a Web Developer, how about zsh? I was wondering if I could use the Guest Profile to make changes that are not always be correct, …

Member Avatar
Member Avatar
+0 forum 1

I am trying to create a gui that will interact with an existing external console application, e.g. the user only changes information in text boxes or radio buttons and that will prompt the VB.net program to sumbit a certain set of commands. I will create a folder for the end user that has only two programs in it, the VB.exe and the OtherProgram.exe. I have tried using ProcessStart with SendKeys to send information to the terminal with limited success (errors include multiple instances opening, entering "ttttttteeeeeeexxxxxxtttttt" instead of "text") and also Shell(OtherProgram.exe) and SendKeys with the same result. I am …

Member Avatar
Member Avatar
+0 forum 4

Vim in my Mac Terminal doesn't show line numbers,when i code in Perl,please guys how do i fix that?

Member Avatar
Member Avatar
+0 forum 1

Hi, I Want a shell script, when i run it should print the current row & column number of the terminal in which is invoked , so how can i get the current row & column number in the linux . Thanks Srikanth M.

Member Avatar
Member Avatar
+0 forum 6

my professor provided us with the java program so we could each compile it and run it on our computers. heres what i get: socketProgramming$ java TCPServer <--------name of program - TCP Server program started. - Server welcoming at port #: 6789 im trying to connect to my professors terminal using her IP address but anytime I type anything, it does nothing but show the characters.. please help

Member Avatar
Member Avatar
-1 forum 3

My objective is to implement a GUI calculator in java. I am thinking of passing the expression entered by the user to bc and then get output from terminal and print to user. My question is [LIST=1] [*]How to execute a terminal command from java so that i can pass the expression to bc [*] How to get output from terminal. Right now I am thinking of redirecting terminal to file and then reading from file but please tell me if it is possible to do directly. [/LIST]

Member Avatar
Member Avatar
+0 forum 17

well this is the first time i am trying to make a module, i saved the .py file into a new directory called MyModules and tried to import it in IDLE, but it returned the following error; Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import polymod ImportError: No module named polymod i found some advice about using the linux terminal and a command called setenv, but it says it doesn't exist. i know this is a really stupid question but i cant find an answer, sorry and thank you for any help.

Member Avatar
Member Avatar
+0 forum 32

I have a C# program that I run on a Windows PC and a camera app running on a Windows CE6 terminal. The two are connected using Activesync 4.5. From the PC app, I want to be able to do the following. 1. Launch the terminal app 2. With the terminal app running, tell it to start a process like image preview 3. With the terminal app running, tell it to take a picture 4. Shut down the terminal app In other words, I want to write the programs such that I have control over a running application from another …

Member Avatar
+0 forum 0

I wrote this program for insertion sort.I compiled the source file in xubuntu terminal.But when I try to run a.out executable....terminal showing "segmentation fault".I don't about segmentation fault..when segmentation fault occurs...what is the thing in the source file that is causing segmentation fault... Thanks in advance...... [CODE]#include<stdio.h> main(){ int i,j,n,key; int a[n]; printf("Enter size:"); scanf("%d",&n); printf("\n Enter elements:separate each by space\n"); for(j=0;j<n;j++) scanf("%d ",&a[j]); for(j=1;j<=n-1;j++){ key=a[j]; i=j-1; while((i>=0)&&(a[i]>key)){ a[i+1]=a[i]; i=i-1; } a[i+1]=key; } for(j=0;j<=n-1;j++) printf("%d ",a[j]); }[/CODE]

Member Avatar
Member Avatar
+0 forum 5

The End.