The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
0answers
29 views

Skip Duplicate Output [duplicate]

I using this command to print an output :- grep -a --binary-file=text "RRRR" /home/path/file.log-$1* | awk -F, "/$line/ {print \$2 \",\" \$9 \",\" \$10 \",\" \$11 \",\" \"(\" \$23 \")\"}" example ...
0
votes
0answers
16 views

Awful sound through speakers in Elementary OS

I just recently installed Elementary OS Freya on my Alienware 14, double booting with Windows 8.1, but I've come against a new problem, the sound that comes out the speakers is just awful, just too ...
0
votes
0answers
66 views

SCP won't copy files due to output in .bashrc

I just uploaded my linux (mint to v. 17.1), and now I cannot upload files to a cluster via scp anymore. I understand that .bashrc cannot output anything during the process for it confuses scp, so when ...
1
vote
1answer
31 views

Save all the terminal output to a file

Is there some way of saving all the terminal output to a file with a command? I'm not talking about redirection command > file.txt Not the history history > file.txt, I need the full terminal ...
0
votes
0answers
11 views

output test results of smartctl into logfile

I set up a cronjob that executes the following script: #!/bin/bash smartctl -t long /dev/sda smartctl -A /dev/sda >> /smart-logs/$(date +"%Y-%m-%d-%A_SMART-report") echo "---------" >> ...
2
votes
2answers
31 views

Cron job is writing the error to error log but fails to write outputs to output log file

I have 2 python codes which i schedule using cron. My codes actually runs from 10:30am to 4:20pm everyday. from 10:30am to 11:00am my codes outputs 2-3 lines every minute and after that they start ...
2
votes
1answer
29 views

Is there any way to exit “less” follow mode without ^C?

Often times I find myself in need to have the output in a buffer with all the features (scrolling, searching, shortcuts, ...) and I have grown accustomed to less. However, most of the commands I use ...
0
votes
0answers
11 views

Result of find in multiple columns [duplicate]

I frequently use find and often the results scroll up the screen while a sizable portion of screen is unused. Is it possible to get the results of find in two or more columns, similar to those of ...
0
votes
1answer
28 views

append file with history line number values

Is there a way to append my_computer.sh with the command on line 330 by only referencing the line number? or with the fewest keystrokes possible? 326 pip install -U pip 327 man pip 328 cat ...
0
votes
0answers
19 views

Grep not writing output until end of input [duplicate]

I have some script that is taking a long time, and producing a lot of output. I want to send the full output to one file, and pick out some specific lines to be directed to another file. Since it ...
1
vote
2answers
45 views

How to view a daemon's output in a session on Raspbian/Debian?

Okay I'm pretty new to Linux and I have setup a Raspberry Pi 2 with Raspbian and it's running a bunch of things for tracking aircraft as well as a receiver (RTL-SDR). It's all working great and I'm ...
-2
votes
1answer
36 views

Using 'grep' to search for a specific pattern [duplicate]

I'm playing with the Linux terminal and I have to do a exercise which states that I have to find inside a file for any line that contains at least an a, b and c, it doesn't matter it the lane has 2 a, ...
2
votes
1answer
103 views

exec redirects in bash

I write a lot of non-interactive scripts where I would like all output to go to a log file and have nothing appear on-screen. To solve this, I've been using: #!/bin/bash exec &> logfile echo ...
2
votes
2answers
166 views

Using the output of `grep` as variable in second command

I currently have 2 bash command line strings I use to gather data needed for a certain task. I was trying to simplify and have only one command used to gather the data without using a script. First I ...
1
vote
1answer
33 views

output log file from some time to some time via ssh

I have a access_log which size is neally 2GB. I want to analyze it from 2015:09:55 to 2015:09:57, but during this period, there have more than 500 items. So I want to output and download the ...
0
votes
1answer
38 views

exit status and no output

I have a command such that bar > /dev/null and I want to know the exit status of bar. I read some posts su about ${PIPESTATUS[0]} but this works when one pipes the output via | and I can't make ...
1
vote
0answers
160 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 ...
3
votes
2answers
128 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
1answer
104 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 > ...
6
votes
2answers
1k 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
24 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
57 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
151 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
88 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
259 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
111 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
56 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
81 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
112 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
427 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
100 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
337 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
55 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
860 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
2k 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
43 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
5answers
3k 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
216 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
749 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
207 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
242 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
337 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
54 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 ...
1
vote
1answer
868 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 ...
2
votes
1answer
962 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
1k 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
32 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
2k 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
274 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 ...