The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
50 views

Bash script run file redirect the license and difent key press to a dialog graphic tool

i am trying to show the license from the ".run" script file in specific , the "TeamSpeak 3 Client" .run , file I am trying to make this with "zenity" , "mate-dialog(s)" and "kdialog" ok right now i ...
1
vote
0answers
37 views

Repeatedly execute bash command while there's no output from another process

I'm running fs_usage to detect access to an object on my filesystem. sudo fs_usage -w | grep -E 'object' I now want to run a touch command on that object every 5 seconds as long as there's no new ...
1
vote
0answers
24 views

redirecting output of running background job in bash

in bash I have some jobs running, in background. They are always producing random irrelevant error messages that pollute the terminal. I am not always so prompt to start them with the 2>&1 > ...
5
votes
2answers
182 views

Suppress 'file truncated' messages when using tail

I'm tailing a log file using tail -f messages.log and this is part of the output: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eget tellus sit amet odio porttitor rhoncus. Donec ...
0
votes
0answers
18 views

Programatically capturing application inputs and outputs

I've been given a mess of applications that all touch various common files and data sources. (Retail IT environment so lots of generic sources of data that gets sliced and diced into various ways and ...
3
votes
1answer
45 views

Get the output of the time command

I have the following command time compare -metric rmse -subimage-search -dissimilarity-threshold 1 -similarity-threshold 0.99 $page \( -size 1x1 xc:black \) null: which produces the following ...
1
vote
1answer
55 views

Get two values from command output in a bash script

I have a bashscript, which executes a command and calculates a pair of values, which output can look like this. a,b (10.0000000000, 10.0000000000) -> volt (2088133.7088034691, -222653.3238934391) ...
1
vote
1answer
45 views

How to enter date as an option in a bash command? [duplicate]

I want to enter the current date (ideally in the form YYYY-MM-DD hh:mm) as an option in a bash script: I tried /usr/local/bin/growlnotify -t "PMK" -m date but then the variable -m inserts the ...
1
vote
2answers
115 views

double grep on tail -f gives no output

If I follow a file somehow like this: tail -f /var/log/syslog|grep s I see all lines containing an "s" Why does this not give any output, if I grep it again to the same "s"? tail -f ...
2
votes
2answers
64 views

Is there a way to execute commands while getting user input?

I’m fairly new to scripting and I have a high-level question of how to do something. I want to design a simple game similar to space invaders, with these two main features for now: Bullets drop ...
3
votes
2answers
28 views

Output parameter in joining two matrices?

I have to join two matrices. $cat mat1 : sample gen1 gen2 gen3 gen4 pt1 1 4 7 10 pt3 5 5 8 11 pt4 3 6 9 12 $cat ...
1
vote
0answers
30 views

Setting the video output for the framebuffer device

I'm working with Broadcom's 97356 device, which contains an HDMI and an analog video output device. I'd like to be able to draw stuff to one of those two devices (or both at the same time!) using a ...
0
votes
3answers
58 views

last command only shows few days worth of logins

I often use thelast command to check my systems for unauthorized logins, this command: last -Fd gives me the logins where I have remote logins showing with ip. From man last: -F Print full ...
2
votes
3answers
90 views

Redirect stderr to a file, but create only if any stderr happened? [duplicate]

I'm running a command like: parallel --spreadstdin --line-buffered 'some_command 2> `mktemp --tmpdir /tmp/stderr`' | do_something The trick is that parallel creates a lot of processes and they ...
3
votes
0answers
44 views

Change output voice frequency

My friend can not hear all voice frequencies. I need software that brings all frequency spectrums to a specific band. Is there any software to help me do this? I mean change all output sound ...
0
votes
0answers
14 views

Terminal output from a program not opened in terminal [duplicate]

Using bash on Ubuntu, I can launch programs from command line and watch what the program is doing 'in the background' while I use the GUI frontend. This is particularly handy when a GUI progress bar ...
1
vote
2answers
146 views

How to grab output from command in shell script [duplicate]

I'm trying to write a shell script in RHEL which will execute grub-md5-crypt and the user will type their password. Now the problem is how can I grab the encrypted md5 hash displayed to the user in ...
1
vote
0answers
37 views

Verbose output in logfile and simple output on screen?

Let's say I have the following script: script.sh and i want the verbose output in a logfile and simple output on screen. Logfile should contain the csh -v script.sh output, and on the screen should ...
1
vote
1answer
277 views

How do I Nohup an interactive shell-script?

My Script is having 2 command-line arguments and then just couple of questions, after these questions the script will run for itself, I'm able to pass the command-line argument by just doing, ...
2
votes
3answers
651 views

Saving individual output lines into variables

I'm using find -mtime -2 to find files modified in the past 24 hours or less. The output looks like this. /home/user/logs/file-2014-08-22.log /home/user/logs/file-2014-08-23.log I need to save the ...
0
votes
2answers
34 views

concatenate .out files

Can I combined multiple .out files with the cat command in bash or csh? Additionally I want only the header of first file to be concatenated and I was thinking of using the tail function for that. ...
1
vote
4answers
463 views

How can I output the difference between 2 files?

My file consists of the the following; roughly: username:username:username:username:username The above line continues to about 600 characters. I use the awk command in order to use it as an ...
4
votes
3answers
184 views

Adding comments using 'set -x'

Sometimes it is really handy to just add set -x to the top of your script to show all commands before they are executed. There is only one drawback creating scripts with a decent output: I don't ...
5
votes
1answer
503 views

ifconfig -a in a shell script

I am writing a shell script to start my network in my virtual machine on boot, since it does not do this right away for some reason with a snapshot of a virtual machine. Since the eth device starts ...
3
votes
1answer
101 views

redirect output for a command that takes in multiple arguments

this command is to redirect output of time to with multiple args: $ time wc test >wc.out 2>time.out unix programming environment book shows that the error output of time redirects to ...
8
votes
4answers
204 views

Save output of command that modifies environment into a variable

How to save output of a command that modifies environment into a variable? I'm using bash shell. Assume that I have: function f () { a=3; b=4 ; echo "`date`: $a $b"; } And now, I can use commands ...
1
vote
2answers
216 views

Do all Linux processes write EOF to stdout when they are terminating/have finished terminating?

I'm having trouble with sending shutdown -h 0 to a lxc Debian container (i.e. executing this command in the lxc) with with the python pexpect module (in a python script). In this module the user can ...
0
votes
3answers
52 views

how to export all numbers that are unique in few text files into another file?

I have a.txt,b.txt,c.txt. Each has different numbers as below: a.txt: 12 14 111 1 15 2 b.txt 12 18 22 23 1 2 c.txt 12 14 15 16 17 1200 The output should contains all the numbers from ...
0
votes
1answer
414 views

Pipe output from one command to another command's non standard input [duplicate]

I would like to do something similar to the following: which someapplciation | cd outputfrompreviouscommand The command which provides a directory and I would like to be able to make that output my ...
1
vote
1answer
452 views

Send copy of a script's output to a file

Say I have a Zsh script and that I would like to let it print output to STDOUT, but also copy (dump) its output to a file in disk. Moreover, the script starts with the following option set -o xtrace ...
3
votes
5answers
819 views

Listing directories based on size from largest to smallest on single line

I can use the following command to get a list of directories and their sizes and sort them from largest to smallest (in the example I renamed the directories to numbers to make this easier to ...
0
votes
1answer
28 views

Is it possible to save in a log everything the system outputs when I turn it on?

I am using a BeagleBone Black without any screen. It works fine, but sometimes when I turn it on it hangs and have to reset. I do not know why this is happening and since I cannot see whatever it is ...
1
vote
1answer
1k views

wget a file, logging the output and showing the output on prompt

In a bash script, I need to download a file from the web, for doing it i use wget command. I would log the output of wget command, and at "the same time" having the output prompting on terminal. I ...
0
votes
2answers
176 views

Shell Script Output not written to file properly

I tried to put the output of my program into a text file. It appends the echo commands to the file properly, but the imagemagick "compare" command is not appended to the file. It just STOUD's the ...
0
votes
1answer
758 views

LS Command output to file [closed]

I want to capture to a file the output of the ls command ls >> lsOutput.log This one works if executed in the command line. But when put inside a shell script (lsOutput.sh), returns ...
1
vote
2answers
870 views

Redirect grep error output to file

I wanted to capture to a file the errors being returned on the command line from grep. For example, grep foo.lookup No such file in directory I want to output that to a log file. This is my shell ...
4
votes
1answer
106 views

Is there a way to cat files as they are created? [duplicate]

Unlike the answer to this question (Can a bash script be hooked to a file?) I want to be able to see content of files that haven't been created yet as or after they are created. I don't know when ...
4
votes
2answers
306 views

Can zsh access the stdout of last run program?

I often use find or locate to find out about paths. (~) locate foobar.mmpz /home/progo/lmms/projects/foobar.mmpz The next step is often to open or otherwise manipulate the files. In a happy case ...
1
vote
1answer
561 views

how do i redirect output from tailf & grep to a file [duplicate]

All I wanted is to grep for specific lines in an ongoing log and re-direct it to some file.. tailf log | grep "some words" Now, I want the above command output to get re-directed to some file in ...
0
votes
1answer
83 views

Need to grep for specific lines from ongoing log and save it in some file

So, let me start with the overall outcome that i want to achieve. There is just one log, which will have info on certain devices, that i am upgrading. I use "tailf log" to monitor the log. Now, ...
-4
votes
2answers
97 views

What is the utility of piping to `/dev/null`?

Seeing that /dev/null's utility isn't immediately obvious to me, what is the use of /dev/null piping?
3
votes
2answers
711 views

Log output of GNU screen in real time?

I'm trying to get the output of a GNU Screen to a log file in real time. I've tried using tee, but that appears to not work with screen. The log function for screen will not work for this as it is not ...
0
votes
0answers
21 views

How to start command in bash without blocking console [duplicate]

There is a problem with starting some commands in bash. When this command is starting its standard output blocked of entering other commands. And till this command do not finishing no other command ...
10
votes
3answers
2k views

How to redirect the output of any command?

I'm trying to write a simple script to monitor my network status, without all of ping's output: ping -q -c 1 google.com > /dev/null && echo online || echo offline The problem is that ...
3
votes
0answers
82 views

Slow terminal print out

Just installed (netinstall) debian wheezy on a second machine newer machine however the terminal print out is noticeable slower than on the old machine although the new have faster CPU, RAM and HDD ...
3
votes
1answer
292 views

Why does grep change the length of output lines?

I often use dpkg or aptitude combined with grep when I want to list certain packages available or installed on my system, but I noticed that when I add | grep, the output lines look a little bit ...
1
vote
5answers
9k views

Pass the output of previous command to next as an argument

I've a command that outputs data to stdout (command1 -p=aaa -v=bbb -i=4). The output line can have the following value: rate (10%) - name: value - 10Kbps I want to grep that output in order to ...
2
votes
2answers
145 views

Show a sliding window of output from a program

I want to run a command (rsync -av) and only display 10 lines of output at any time. I have found a similar post, but I don't want to redirect it to a file. I want the output to be displayed ...
1
vote
1answer
189 views

Using sed output in another script or command

How can I use the output of sed in another script? For example (this doesn't work): sed -n "$COUNTER",1p /domains.csv | wget or sed -n "$COUNTER",1p /domains.csv > /myScript.sh As far as I ...
1
vote
1answer
58 views

Check standard output of a background processs in real time

Let us say I submit a process in the background and I want to see the stdout and stderr. In another post it was suggested: command > logfile 2>&1 & But when I do head logfile I do ...