The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
29 views

View the recent stderr output for a terminal window

I'm using Linux Mint 13, MATE edition. I've just run a lot of very slow rsync processes which created a huge amount of output to STDOUT. The last one also outputted a message (presumably to STDERR, ...
2
votes
1answer
41 views

Pausing terminal output

I have a command which outputs lots of data (say, strace with lots of syscalls, running for a few minutes). Is there any option (e.g. command wrapper or something similar) that would allow me to ...
0
votes
1answer
25 views

parse snmpwalk output to array

Im trying to get network interfaces by doing a snmpwalk, but cannot separate in array, the variable stores all in element 0 ifname=(\$(snmpwalk -Oqv -v2c -c comm xxx.xxx.xxx.xxx 1.3.6.1.2.1.2.2.1.2))...
5
votes
1answer
244 views

Newline (“\n”) before output in bash

I want to modify my output in bash for better view of output. Simply put \n before this. How can I change it in .bashrc? For example: It's default: root@comp:$ abc bash: abc: command not found I ...
2
votes
4answers
53 views

Access a file located with find

In many cases after I find a file using the find command I then want to open the file or cat it or maybe print it. How can I operate on the result from find? For example, : find . -name "myfile.txt" ...
0
votes
0answers
35 views

Problem monitoring serial output using ts

I have to continuously monitor serial output from an Arduino device. So far I have been using ts from moreutils with the following command: ts '%H %M %S' </dev/ttyACM0 >output.log Earlier it ...
3
votes
0answers
66 views

Can't get rid of x11vnc output

I'm on an Ubuntu system which has a touchscreen set up on display :0. I wanted to be able to control this touchscreen remotely from Windows, so I set up x11vnc. It works great. But here's the setup: ...
13
votes
2answers
715 views

dd: write to multiple disks?

I have 2 exactly same formatted, same size and same brand SD-cards. I would like to dd image to /dev/disk2 and to /dev/disk3 at the same time. Pseudocode sudo dd bs=1m if=/Users/masi/2016-05-10-...
0
votes
1answer
41 views

How to redirect the warning message from command line to a log file?

I have a below loop that is used to check the active namenode in Hadoop cluster and if the first node is inactive it picks up the second. for (( i=0;i<$(($(wc -l < $LOCAL_DIR/'tempip.txt')/3));...
2
votes
1answer
56 views

redirect split output

I split a gz file using gunzip piped to split: time gunzip -c file.gz | split -l 500 -d -a 4 - pref_ Which generates the following files: pref_0000 pref_0001 I'd like to pipe those files to zip ...
0
votes
1answer
28 views

how to color specific strings in standard output and standard error [duplicate]

How do you color specific strings in standard output and standard error? For example: gpg --verify Outputs either a good signature or a bad signature string. How can I color the good one, green; ...
0
votes
4answers
105 views

Writing output to file, similar to “script” command?

Is there anything that's similar to "script" but does not require the terminal to be open? I want to save the results from my program into a file, however I have some issues. I need to work ...
1
vote
1answer
53 views

System is no longer outputting UTF-8 characters

I just had an issue with my server where it responded incredibly slowly, so I forced it to reboot over SSH. When I connected back, I found out my system no longer outputs certain characters correctly. ...
1
vote
3answers
65 views

Go to first line of console output of a command

Let's say I am calling ls -la, which produces a very long output. Is there any key/command which lets my console scroll up to the first line of the output?
4
votes
1answer
37 views

Turning off console output?

I have a Debian on beaglebone without an X server and I need to get rid of any console output to the framebuffer device. I was trying few things I found, like console=null or kernel argument vga=0, ...
0
votes
1answer
57 views

How do I output stderr/stdout of my script to both a file and the console?

I'm using Amazon Linux and writing a script in bash. I want to output both stderr / stdout (preferably in the order that they occur) to a file as well as the console. However, this command isn't ...
2
votes
2answers
48 views

GNU Parallel: immediately display job stderr/stdout one-at-a-time by jobs order

I know that GNU Parallel buffers std/stderr because it doesn't want jobs output to be mangled, but if I run my jobs with parallel do_something ::: task_1 task_2 task_3, is there anyway for task_1's ...
0
votes
1answer
16 views

monitor simple process output

On my system I can check a job's status using qstat: $ qstat 2048930 Job ID Name User Time Use S Queue ------------------------- ---------------- ------------...
2
votes
1answer
33 views

Sending `time` command into text file [duplicate]

I want to get the result of time command into a text file but it's not working it only put blank space in the text file. I already tried this commands, A- $ x=`time` $ echo $x > log.txt $ cat ...
1
vote
2answers
102 views

Bash script - run application and show live output

I've got a bash script that sets up some environment parameters and then runs a c++ application. The c++ application outputs information showing it's current state as it runs. Currently, I only see ...
1
vote
1answer
45 views

How to get file descriptor number of a output and how to redirect all of them at once

Lets take this command for example $ time ssh ec2 ls www apps real 0m0.554s user 0m0.004s sys 0m0.000s $ time ssh ec2 ls 1>/dev/null real 0m0.554s user 0m0.004s sys 0m0.000s $...
1
vote
1answer
62 views

script Multiple Commands

I have a PHP script I'm running from Cron. I want to save its output to file, but also want to save the shell output to a different file. Ideally, I'd like to have this in one line. As such, I tried ...
0
votes
1answer
72 views

Don't know if fsck failed or not

I just ran fsck on my newly bought SD card for my Raspberry Pi and it shows the following output: fsck from util-linux 2.25.2 fsck.fat 3.0.27 (2014-11-12) /dev/mmcblk0p1: 75 files, 2539/7673 clusters ...
0
votes
2answers
36 views

Shell script - blanks are not always recognized as such?

I'm confused on how bash interprets blanks while executing a script. In the end, I want a script that is fed by a csv file containing software used by an organisation and it should return the CVEs for ...
2
votes
2answers
102 views

Output is in console but not part of stdout or stderr

I have a command that outputs the following: READY Listening.... HELLO READY Listening.... TEST It is speech recognition from pocketsphinx_continuous. I need that output redirected to a file, and ...
1
vote
1answer
613 views

Redirect Output of Pocketsphinx_continuous to a file

I have an ugly command: pocketsphinx_continuous -samprate 48000 -nfft 2048 -hmm /usr/local/share/pocketsphinx/model/en-us/en-us -lm 9745.lm -dict 9745.dic -inmic yes Breakdown: It listens for any ...
2
votes
2answers
210 views

Is it possible to show rsync output on a single line?

I have a bash script that is rsyncing a large directory and the --progress function is great, but is it possible to show all this output on a single line? ie. as the files transfer, just spit it the -...
3
votes
5answers
298 views

Concatenate contents from stdout and from file

How can we concatenate results from stdout (or stderr) and a file into a final file. For example ls -a | grep text1 concatenate with file2.txt into a final result (not file2.txt), without storing ...
0
votes
3answers
489 views

sudo iwlist wlan0 scan | grep ESSID > essid.txt (How do I export without the word ESSID in txt file)

So my goal is to answer my other question I am working on. Which is Connect to Open Wifi. Currently I am getting close, as I know there is only one Wifi connection, I would like to export the results ...
19
votes
3answers
780 views

How to prevent random console output from breaking the terminal?

There are many questions on SE that show how to recover from terminal broken by cat /dev/urandom. For those that are unfamiliar with this issue - here what it is about: You execute cat /dev/urandom ...
0
votes
4answers
41 views

Loop a program if the input is missing

I have this script that runs perfectly well, I would however like to re-run the script if the wrong input is entered, how could this be done? #! /bin/bash #! userInput - a script that reads in text ...
-3
votes
1answer
28 views

Output the result of a variable

I have an if statement and I want in one case to add one to a variable v and in the other case to a variable inv. I did the following v=$((v + 1)) and inv=$((inv + 1)) I want to outputs the results of ...
0
votes
1answer
146 views

Show only graph in htop output

Would it be possible to show only the summary section of htop output? desired look: I have looked into the manpages but couldn't find any options to do so. The closest thing i have found is this:...
1
vote
3answers
79 views

How use an if statement to change the output message

When i run this command it still outputs the same message when nothing is in the waste bin directory, how could I get the command to output a different message when there are no files in the bin? ...
1
vote
1answer
67 views

Pretty print output of “kill -USR1”-ing dd

When dd is done it prints a three line summary about the number of read and written segments, the total size and average writing speed. While it does its work, dd is awfully quiet. Not too long ago (...
1
vote
2answers
21 views

Watch: Only print to screen if output has changed since last output

I'm running a process and I'm counting the number of threads with ps huH p <PID_OF_U_PROCESS> | wc -l I can run this thread with watch like this; watch -n 1 ps huH p <PID_OF_U_PROCESS> |...
2
votes
2answers
55 views

How do I write the output of Portage to a txt file?

I would like to be able to write the output of Portage commands, along with other commands, that I perform in tty (that is, the screen-wide terminals started with Ctrl+Alt+Fn where n represents an ...
1
vote
0answers
50 views

cups: connection timed out

Per title I'm showing connection timed out in the /var/log/cups/error_log. D [29/Oct/2015:17:43:32 -0400] cupsdSetBusyState: Printing jobs D [29/Oct/2015:17:44:04 -0400] [Job 11441] Connection ...
1
vote
1answer
638 views

Get the output from expect script in a variable

I have an expect script which provides the IP address: #!/bin/expect -f set nodename [lindex $argv 0] spawn virsh console $nodename expect "Escape character is" send "\n" expect "localhost login: " { ...
2
votes
1answer
40 views

combining output from different scripts into different files in a loop

First of all: I hope the question is comprehensible, otherwise please let me know and I will do my best to make it more clear. This is a follow up to Replace one entire column in one file with a ...
1
vote
2answers
1k views

Permission denied on file under /tmp

I have a bash script that reads filenames, takes a selection of data, build a table, and then adds the header. Unfortunately, at the point to add the header and give the output file, I have the ...
1
vote
1answer
28 views

Interactive bash script

I'm writing a script that shuts down the Apache service, performs a function, and turns it back on. I'd like to get some type of interactive confirmation for each process. I'm not familiar with ...
1
vote
1answer
105 views

Trim monitor output (because of dead pixels)

I searched a lot and finally came here to ask my question. Recently my screen got damaged and now has some rows of dead pixels. They are located at the very top of the screen and making it very ...
5
votes
1answer
277 views

Show output on terminal and output to log file, without using tee

I want to run a command, then show the output on the screen as well as output it to a log file, currently I use tee -a, but the problem is tee doesn't preserve colours, and currently I have not been ...
5
votes
1answer
142 views

Non-standard sorting of the ls output

I usually include a date in the filename so that files and directories are listed in chronological order when I use the ls command, e.g. 2015-08-29_letter_to_santa.txt. A drawback is that tab-...
1
vote
2answers
149 views

Can bash shells automatically recognize Gnome terminal window's width?

/bin/less is the default pager on an Ubuntu 14.04.3 LTS desktop OS (the $PAGER variable is unset) and gnome-terminal 3.6.2-ubuntu1 is used. If I try for instance: $ man man The displayed output ...
0
votes
2answers
177 views

wget, logging the output and the response

I calling an url using wget. This url gives me a response, its a Message id. I want to write the logs to a log file, with the message id as well. Also the log should be appended each time. I trying to ...
0
votes
2answers
343 views

Bash output command too large, can't read it!

I'm having some troubles on Ubuntu 14.04 initialization, it fails to mount an SSH folder and gives me the option of a manual recovery by pressing M, displaying a command-line logged at root user for ...
-1
votes
1answer
55 views

modify perl output [closed]

currently I have the following script #!/usr/bin/env perl use strict; use warnings; my %seen; my $header = <> . <>; print $header; my $last_sequence_number = 0; open( my $output, ">...
1
vote
1answer
96 views

How do I prevent the Keyboard Interrupt from being sent through the Screen program

I am making a python program, whose output (not input) can be viewed via the screen program. However, the problem is that doing this allows the user to turn off the program via the Keyboard Interrupt (...