10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need to tail -f a file output stream and I need to get only lines that contains "get" and "point" in the same line. It doesn't matter the order.
Then I need only the text BEFORE "point".
I have to count each line and perform other serveral actions after this has performed 3 times.... (9 Replies)
Discussion started by: Kibou
9 Replies
2. Shell Programming and Scripting
hi,
i have posted the same kind of the question in some other forum of the same site. but realized that it is supposed to be here so i am reposting it .this is the perl script written to check for particular pattern.
my file 1 would look like this
hwk:678:9878:asd:09: abc cfgb 12 nmjk ......... (3 Replies)
Discussion started by: anurupa777
3 Replies
3. Programming
Hello All,
iam a new memeber today i joined this forum.
hope i will get help. the below program takes input strings and give reverse of input string.
&& mv /home/test1/programs/display /home/test1/programs/old
echo " Please enter the test "
read a
echo "$a" > file
wc -c file > file1
perl... (1 Reply)
Discussion started by: ameyrk
1 Replies
4. Shell Programming and Scripting
Hi
I used this command:
mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \
-cache 1024 -fps 25.0 -nosound -vc ffh264 \
-demuxer 3 -dumpstream -dumpfile output.avi It's ok but...
Video Playing is very fast! Why? Is it a synch problem?
What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies
5. UNIX for Dummies Questions & Answers
I Wrote code that forks into two processes, a parent process, and a child process. The parent process will take the arguments to main() and send them one character at a time to the child process through a pipe (one call to write for each character). The child process will count the characters... (1 Reply)
Discussion started by: hansel13
1 Replies
6. Programming
1 #include <fcntl.h>
2
3 main(int argc, char *argv)
4 {
5 char buf;
6 int fd, count = 0;
7
8 if (argc > 1)
9 fd = open(argv, O_RDONLY);
10 else
11 fd = 0; /* Use standard input */
12
13 while (read(fd, buf, 1) > 0) {
14 if (count < 5) write(1, buf, 1);
15 ... (3 Replies)
Discussion started by: bishweshwar
3 Replies
7. UNIX for Dummies Questions & Answers
Hi there again,
Running Solaris 10 with built-in Java. Seems to compile and run fine.
Problem is: Say I want to see contents of current directory. In a shell, I'd just write "ls" and it outputs the content.
When I write a Java file, I have the following line:
System.out.println("ls");
... (1 Reply)
Discussion started by: EugeneG
1 Replies
8. Programming
The output I got for this pgm is "4 4 4 4".
Can any one help me to understand how I got this output.
Also please suggest me some links to learn about argumnets evaluation in C.
# include <stdio.h>
void func(int a, int b, int c, int d)
{
printf("%d %d %d %d", a, b, c, d);
}
int... (3 Replies)
Discussion started by: arunviswanath
3 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have a C++ program that generates a lot of log information on the console, I need this output (printed using printf function) to go to a file since I will use crontab to schedule the job.
I know I can do this:
myprog > myfile
but I don't know how to enter this in crontab.
I use... (3 Replies)
Discussion started by: GMMike
3 Replies
10. Programming
Hi all,
I've a structure let's say
typdef struct a { int a; int b; char* string} b;
I need to make the function smth like readdir(), returning everytime it's called pointer to the next structure. Let's say functions would read the next file in the directory and all the permitions put it in... (2 Replies)
Discussion started by: solvman
2 Replies