10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I was looking for samething more compact than this:
$: a=`ls`
$: declare -i num=0
$: for x in $a; do num=$num+1; echo "$num ..... $x"; echo "$num $x">fl_tmp; done
And jump in my mind to use parallel but look at the performance:
$: a=`ls`
$: time for n in {1..10}; do parallel... (3 Replies)
Discussion started by: flaviofachin
3 Replies
2. Shell Programming and Scripting
Looking to create a script to listen to each output from a task while it is running and launch a function if a specific error message is found at any point and if not to continue uninterrupted.
#!/bin/bash
read checker <<< $(reaver -i mon0 -b 'target bssid' -vv)
if ; then
function
elif... (1 Reply)
Discussion started by: 3therk1ll
1 Replies
3. UNIX for Dummies Questions & Answers
I'm pretty sure I had the answer to this months ago and have misplaced it. Needless to say I will bookmark it this time.
I have a background process that's been running way longer than usual. It doesn't output anything to a file, so I can't 'tail -f' it. Is there a command that will enable me to... (2 Replies)
Discussion started by: dheian
2 Replies
4. Shell Programming and Scripting
Hello Friends,
I'm trying to save process status of root user sorting by CPU usage. However i couldnt save the continuous, standard outputs into a file. Do you have any idea to do it?
prstat -u root -a -s cpu | sed -e '/^$/d;/sleep/d;/Total/d' >> stat.txt
>ls -l stat.txt
-rw-r--r-- 1... (1 Reply)
Discussion started by: EAGL€
1 Replies
5. Programming
Can you help me ?
I want to write a program ,which can open a input file (input.txt) and run as child process ,then write to output file (output.txt).......
char inFile="input.txt";
char outFile="output.txt";
int main(int argc, char **argv)
{
pid_t pid=1;
int no=0; // no. of... (5 Replies)
Discussion started by: cupid1575
5 Replies
6. Shell Programming and Scripting
When I run <ls -l> to get a list of all the files, I want the displayed result to be written to a text file. Is there a way to do that? (1 Reply)
Discussion started by: kn.naresh
1 Replies
7. Shell Programming and Scripting
HI all!
I have a problem parsing the output of another process. The output is like this (C):
printf("\rCheck exist: %d/%d",idx,pBF->NBits());
The aim of the script I'm coding is to save in a separate file the last output line of first process.
This is the script now (Shell script):
... (3 Replies)
Discussion started by: victorin
3 Replies
8. Shell Programming and Scripting
I'm trying to get the ps command to just output the name of the processes currently running, but I can't figure out a way to do it. I'm using OSX, so some UNIX features are crippled. Is there any way for me to do this?
Thanks,
Black Leopard (4 Replies)
Discussion started by: blckleprd
4 Replies
9. UNIX for Dummies Questions & Answers
Dear guru,
Say I have a long process that is executed in this way:
$ nohup perl mycode.pl > output.txt &
Now if I want to view the output file with vi, while process
still running:
$ vi output.txt
Will it kill the process? (seems to me it does). If so how can view the file
without... (4 Replies)
Discussion started by: monkfan
4 Replies
10. UNIX for Advanced & Expert Users
Hi,
I had a process that was producing a standard output (no log of it eing produced), unfortunalty the xterm it was running in died and I lost the output. I have logged back in and can see that the process didn't die. How can I bring this process to the foreground so that I can see the output?... (2 Replies)
Discussion started by: nhatch
2 Replies