Search Results

Search: Posts Made By: sanchopansa
44,972
Posted By sanchopansa
Thanks for you suggestions everyone. I ended up...
Thanks for you suggestions everyone. I ended up using your last one Jean-Pierre and though it is not exactly what I was looking for it helped me do what I want.
44,972
Posted By sanchopansa
Jean-Pierre, I really appreciate your help. What...
Jean-Pierre, I really appreciate your help. What you've suggested is very close to what I am trying to achiveve with one difference only: the input is displayed only after return hit and I want it to...
44,972
Posted By sanchopansa
OK. Excuse me for my messed-up terminology, I'm...
OK. Excuse me for my messed-up terminology, I'm still a beginner.
Would you mind telling me than how can I make a script that reads from stdin closes stdin when CTRL+D is entered and outputs what...
44,972
Posted By sanchopansa
@Glenn Arndt I am using bash and I looked...
@Glenn Arndt
I am using bash and I looked through the trap sigspecs and couldn't find which signal corresponds to CTRL+D.

@aigles
I've tried the loop you suggested but the problem is that it...
44,972
Posted By sanchopansa
terminating script with CTRL+D
Hi,

I'm trying to make a script that reads the console input and terminates with CTRL+D. It's absolutely basic but I don't know how to "read" the CTRL+D. I've tried a bunch of things like

...
Forum: Programming 10-18-2006
2,577
Posted By sanchopansa
Hello, blowtorch. I am compiling this with...
Hello, blowtorch.

I am compiling this with gcc 3.2 on Slackware and it didn't show any errors.
Not that I have any experience with debugging under Linux but that's rather strange. I've just...
6,775
Posted By sanchopansa
No particular reason. I just thought it would be...
No particular reason. I just thought it would be a useful thing for me to do because I'm a beginner and I can learn something interesting like this.
Whatever...
Forum: Programming 10-18-2006
2,577
Posted By sanchopansa
function debugging. help
Hi,

I tried creating my version of the cat function in bash but left it and now I'm trying to make this function work, but it wouldn't.


#include <sys/param.h>
#include <sys/stat.h>
...
6,775
Posted By sanchopansa
I think I am giving that up. I started a C...
I think I am giving that up. I started a C implementation of the cat and it is much easier to implement.
6,775
Posted By sanchopansa
need help with my implementation of cat in bash
Hello,

A few days ago I created my amateur version of the cat function in bash. Here is what I've done:


#!/bin/bash
#This is mycat. Similar to cat.
#For detailed information use...
1,405
Posted By sanchopansa
I just tried it out and realized this is not what...
I just tried it out and realized this is not what I want to do. The -o option speciefies the file in which to place the output. What I was looking for is the following:

#include <stdio.h>...
1,405
Posted By sanchopansa
Thank you, Hitori. It is the first time I'm using...
Thank you, Hitori. It is the first time I'm using gcc and I looked through some of the info and manual but couldn't find what I was looking for.
1,405
Posted By sanchopansa
gcc question
Hi,

I am trying to compile a .c file but in the pre-processor directives I want to include a file that I have put together myself (#include "file.h"). How can I accomplish this?
2,227
Posted By sanchopansa
Ygor and mahendramahendr your suggestions work...
Ygor and mahendramahendr your suggestions work fine. I'm trying to implement your one Ygor but I'm printing two colums at the same time and it strips off the first one entirely. This is the ouput and...
2,227
Posted By sanchopansa
how to get the number between two signs
Hi,

I have the following problem. I want to extract only the numbers from a column with output like this one:

*:bootpc
*:ssh
192.168.0.90:42904->192.168.0.3:jabber-client...
1,634
Posted By sanchopansa
Thanks for the information, guys.
Thanks for the information, guys.
1,634
Posted By sanchopansa
strange cat question.
Does anyone know what the microprograms behind cat (and other commands) are like? In what language are those programs designed? Is their source available somewhere?
No particular reason, just...
116,814
Posted By sanchopansa
resolved
I finally managed to solve. I used the uniq command with its -f property and now with lsof -i | uniq -f 7 the lines with the threads are deleted. Thanks to everyone who helped.
116,814
Posted By sanchopansa
OK, what I get now is a table like the one above...
OK, what I get now is a table like the one above generated from netstat -tuv | lsof -i and I need to remove any repeated lines that start with the same process. This would solve my problem. In this...
116,814
Posted By sanchopansa
What I have now (after removing the duplicating...
What I have now (after removing the duplicating threads) is this:


And what I would like to have in the end is something that looks like this:
116,814
Posted By sanchopansa
Your suggestion works out fine, vish. Thank you....
Your suggestion works out fine, vish. Thank you. I used the one provided by Ygor but I had to pipe all the commands on one line to get what I wanted. Now I have a slightly different problem with the...
116,814
Posted By sanchopansa
Changing NR==2 causes only one line of output to...
Changing NR==2 causes only one line of output to be displayed for the whole lsof -i<ports.list and what I would like to do is to have the first line of every output.
116,814
Posted By sanchopansa
head -1 seems to cut all of the output lines. ...
head -1 seems to cut all of the output lines.
Here is what I have as output:

dhcpcd #corresponds to first output
sshd #correspond to sencond output
psi #corresponds to third output
psi #third...
116,814
Posted By sanchopansa
How to get only the first line of output?
Hello,

I'm still a beginner at this so I hope someone would explain this basic stuff to me. I have the following function:


showProcesses()
{
netstat -atuv | awk '{print $4}' > ports.list...
3,543
Posted By sanchopansa
Thanks once again. I realised that I don't need...
Thanks once again. I realised that I don't need the awk thing and removed it myself but I wasn't aware that the file was unnecessary too. I will remove it- it is a serious optimisation.
Showing results 1 to 25 of 38

 
All times are GMT -4. The time now is 05:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy