Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
21 views

replace MTA with something not email related

What I try to achieve is to send all my server logs, errors, crontab outputs etc. with something like telegram or signal. I am locking for a MTA with can handle a different backend and is still ...
0
votes
1answer
46 views

Trying to move words from dictionary using grep command to append .txt file [closed]

Doing a project going for extra credit by making script to do work for me instead of me typing in commands over and over. I need to move several words from a file. Not just the words, but words ...
0
votes
0answers
24 views

Script output formatting

I am writing a diagnostics script currently using echo commands like echo -e "Hostname:\t\t"`hostname` which prints out Hostname: {hostname} Would I be better served accomplishing this task ...
0
votes
0answers
21 views

write output files for jobs submitting via Torque qsub

I am working on a HPC where I have to submit jobs via TORQUE. I was able to create output file for the following but unable to do the same when going through job queue. I was able to write hello.txt ...
0
votes
0answers
13 views

All output devices disappear Debian

A little while ago I installed pulseaudio so that I could connect bluetooth to my laptop. After that volume control keys stopped working, I had to use slider to control audio. I was displeased and ...
14
votes
2answers
3k views

Why is there output of ping after it has been terminated?

When a process breaks, as I know no output will be return anymore. But always after breaking ping command we have the statistics of the execution, and as I know it's part of the output. amirreza@time:~...
0
votes
0answers
13 views

Mapping missing audio devices to Playback hardware devices?

I am trying to correlate or map my integrated Display-port and HDMI ports to devices listed in the output from aplay in a attempt to enable the audio outputs on them simultaneously. However, I am only ...
2
votes
1answer
205 views

How to output sound on 3.5 mm stereo jack and via UPnP-stream simultaneously?

Imagine a standard desktop computer. Connected to this computer is a pair of loudspeakers via common 3.5 mm stereo jack (AUX). Everything works fine so far. Now we have a further speaker in another ...
0
votes
1answer
46 views

Print a message before the Bash pauses its output

I'm currently doing some Bash scripting and have built a tool that returns log information. However, the script sometimes returns a lot of lines (depending on what is going on on the network) and Ctrl+...
3
votes
1answer
191 views

Let a Windows program (in Wine) capture stdout of a Linux program that it runs

I have a Windows program running under Wine. That Windows program lets me set up "tools" to run external programs and then it will capture their standard output/error and show it to me ...
0
votes
1answer
25 views

how can i pull data based on certain flags for rows of data and create a new file with them

I'm working with Upper Air Balloon data with a format of .... **254 12 1 JAN 2002 1 94703 72501 40.87N 72.87W 20 1116** 2 100 100 250 40 32767 3 **3 ...
0
votes
1answer
48 views

rsync with the “--progress” option prints extra garbage information

when using rsync with the --progress option, in addition to printing progress, it also prints strange codes (xfr#1, to-chk=2/4), ie: rsync -a --progress --delete src dst 1,206 100% 0.00kB/s ...
0
votes
1answer
24 views

Generate output only if other command already generated output

In this bash script, I update all apps inside all my Nextcloud docker instances: #!/bin/bash ALL_NC="next1.mycloud.com next2.mycloud.com next3.mycloud.com" for i in $ALL_NC; do DOCKERIMAGE=...
0
votes
4answers
53 views

Redirect UNIX output to append file

So I'm writing a Python script that passes different parameters to a Unix command and I need all of the command outputs to be saved to the same file. However the only way I know is to re-write the ...
1
vote
3answers
197 views

How to save terminal output to file?

There are, of course, many ways to save terminal output to a file. However, all the ones I know of require you execute them before the commands who's output you want to save. Is there a command for ...
1
vote
1answer
84 views

Interpret disk errors output from ras-mc-ctl --summary

When I run ras-mc-ctl --summary I get the following output: No Memory errors. No PCIe AER errors. No Extlog errors. No devlink errors. Disk errors summary: 0:0 has 15356 errors 0:2064 has ...
0
votes
1answer
41 views

Output of lsblk includes both pipes and back ticks

sda |-sda1 ntfs Recovery F49E60439E5FFD0C |-sda2 vfat ...
1
vote
1answer
110 views

Possible in bash to conditionally redirect output to either stdout or /dev/null?

Use-case: I am writing a script that will accept --simulate which acts as a dry run and only prints the command rather than running it. When running normally (i.e. not with --simulate), the command ...
2
votes
3answers
253 views

Save output of command in array

I am executing this command ar=($( ssh -i id_rsa -T -y root@1.1.1.1 sh -c "id;whoami;ps aux")) I need to save the output of each command executed into the array and call the array, but i ...
0
votes
0answers
100 views

libgpiod get the state of an output?

gpioset works but gpioget converts the line to an input instead of an output. What's the point of removing sysfs if apps have to re-make it for state tracking. Anyone know how to read the state of an ...
0
votes
1answer
16 views

save output on multiple files

I'm trying to send disk space update to multiple files so that one file will have current update which will get overwritten every hours and another file can have all the updates where it appends the ...
1
vote
2answers
34 views

How to remove unneccessary spaces from table output in shell while still keeping columns aligned?

Below command outputs a table of space delimited text, is there a tool to remove the unnecessary spacing here while still keeping the columns aligned? $ sudo ss -ltpn State Recv-Q Send-Q ...
0
votes
1answer
42 views

ls command is not resulting file timestamp instead it is just displaying only year [duplicate]

While I am running ls command on IBM AIX machine, sometimes it is resulting in only year part of the file timestamp. For example : ls -lrt test.txt 0 Apr 28 2020 test.txt but sometimes the ...
0
votes
1answer
148 views

Substitute or merge output of two commands in one, using one line command

How can I merge the output of two commands in one, using one command? command1 output: ID NAME1 COLUMN2 xxx-1 aaa bbb xxx-2 ccc ddd xxx-3 eee fff xxx-4 nnn ...
1
vote
0answers
32 views

How to redirect output files of a program?

I have the following distribution of files: samuel@samuel-TM1607:~/Documents/Fisica/19-20/Radiactividad/Prácticas/Practicas-onteCarlo0/GAMMA/prueba$ ls ../ detector-1.in GAMMA-Resultados penmain-...
0
votes
1answer
31 views

Not override a file when used as stdout of a c program

I have used gcc and make to compile a c file. The name of the run file is sequence. I have two goals: Have an input file (i.ein1) as stdin and run the program. when the program finishes using in1 and ...
0
votes
0answers
145 views

Simultaneous audio output for bluetooth device and audio jack using blue alsa

I would like to have a simultaneous audio output to a connected bluetooth speaker and the normal audio jack at the same time. The audio output via the bluetooth works already, but I can't get it ...
0
votes
2answers
95 views

Append text to flagged output of awk

I have a function that takes a filename. It then runs a command and filters the output (exclusive) between two patterns, then it outputs comma separated values with the filename output of the command. ...
2
votes
1answer
156 views

Remove extra blank lines from CMD adb shell, when redirected to file

I am outputting results from an android shell command to a file, with MS-windows cmd via ADB.exe. It outputs the correct results, but I am getting an extra line between each result. It looks ...
0
votes
2answers
5k views

Running Python script using shell script redirecting python output

I am running my python script using a shell script run.sh to restart it if crashes : #!/bin/sh COMMAND='nohup python3 -u test.py run >> py.log &' LOGFILE=restart.txt writelog() { now=`...
0
votes
0answers
33 views

How do I interpret `flatpak install` output?

I'm simply trying to install Spotify with flatpak install spotify. Here's the output: Looking for matches… Found similar ref(s) for ‘spotify’ in remote ‘flathub’ (system). Use this remote? [Y/n]: y ...
0
votes
0answers
23 views

expect redirect incomplete output in rhel 7.5

Can any one help me out with redirecting shell out. [root@localhost automation]# vi cs300.sh #!/usr/bin/expect -f set timeout -1 spawn ssh Monitor@172.30.19.96 expect "Password" send "Password\r" ...
0
votes
1answer
28 views

Disk usage command problem

I used du -h hello where hello is a file or directory name. It printed 4.0k hello in output. I don't need the output to contain the .0k part. How can I remove that so that the output is just 4 ...
1
vote
1answer
354 views

How to see previous output in terminal window?

I was running a lengthy scientific simulation (which took almost a week to run) on my Linux workstation with the command which looked like this: time ./simulation So besides getting the output files ...
0
votes
2answers
204 views

poll for the right output of a command

completely new to bash so any assistance is much appreciated. I'm looking for a script to do the following, its a pretty simple script but I cant seem to get it: I want to run a command, this command ...
0
votes
1answer
61 views

why executing ls > empty.txt shows me empty.txt inside empty.txt in an empty folder?

why in an empty folder executing ls > empty.txt shows me empty.txt inside empty.txt ? it is not poetry, it is true and I do not know why. For me, they way to think ls > empty.txt is the ...
0
votes
2answers
82 views

Terminate process upon specific output

How can I terminate a process upon specific output from that process? For example, running a Java program with java -jar xyz.jar, I want to terminate the process once the line "Started server on port ...
0
votes
1answer
76 views

How to display only extracted files with tar, not the ones which are not extracted /not overwritten?

I'm extracting a tar archive with tar -xf /tmp/update.tar -C / -v --keep-newer-files. The -v Option is to display all files processed, the --keep-newer-files Option is self explaining. Due to all ...
2
votes
2answers
127 views

Easiest way to get `+` indented `tree` output

I need to replace indentation in tree output with + signs so that instead of this: $ tree --noreport dir dir ├── dir1 │ ├── file1 │ └── file2 └── dir2 ├── file1 └── file2 it'd print this:...
1
vote
1answer
56 views

grep multi text file input and create diferent output each file

i have script that filter several text file using grep and awk in loop, my issue is when create output to each file after filtered, this my script: grep_multi.sh path=$(find /home/folder/file/...
0
votes
1answer
76 views

grep of executable commands with variable

Have a file with thousands of lines like so : echo " device " ; login 'command' ip > device_command" $(date +"%Y_%m_%d_%I_%M_%p")".txt I run my script like so: ./script.sh | grep "device" ..in ...
2
votes
1answer
418 views

How to save command line screen output in Linux after running program?

I ran a program that has a good amount of command line output, and it ran on a screen in a ssh server. I referred to this post so that I can scroll through the screen and see the output, but there is ...
3
votes
0answers
43 views

Why does my touchpad stop working when I plug in my (normal, non-USB) headphones?

It's the darnedest thing. And only started happening within the last two days. Whenever I plug in my 3.5mm AKG headphones into the appropriate spot on my Acer Chromebook 15 CB3-532 running Ubuntu 18, ...
0
votes
1answer
281 views

Clean formatting of output within bash scripts

I ran across a problem formatting the output during runtime while preserving the format of the code in some scripts. The below works for me, just wanna check that it's reasonable? It seems to dirty up ...
2
votes
4answers
2k views

Next command output on the same line? Bash script

I have the following simple script: echo "-------------------------- SOA --------------------------------" echo " " echo -n " ---------> "; dig soa "$1" +short | awk '{print $3}' The output is ...
1
vote
1answer
100 views

Grep: separate output into two column and save them into txt file

In a directory, after running ls -d -- 0.*_*.txt | sort -t. -k1, I obtained output filenames such as 0.230_0.203059.txt How can I further writing each of them into two columns like 0.230 0.203059 ...
0
votes
1answer
1k views

Sybase query: save output to a file

I´ve created the following script: #!/bin/bash isql -U databasename_dba -P password -b <<EOF! select quantity, date from name_table where numer_id="1234" go quit EOF! ...
0
votes
2answers
110 views

Print lines between two patterns, pausing until keypress after each chunk

My sed or awk can print line between two patterns, but how can I make it display one by one? Example - It should display the first part of the output, and when I press Space it should display the 2nd ...
0
votes
1answer
999 views

How can I search terminal output?

Say I type git help to learn about the merge command. I don't want to read all the output just the lines that contain merge and their surrounding lines. I thought this would be a common question but ...
1
vote
1answer
125 views

Output fdisk bash command to multiline variable

I can't seem to figure out how I can put a fdisk command from a bash script in a multiline variable. Here is my code hdds="$(sudo fdisk -l | grep "Disk /dev/sd" | awk '{print$2}' | sed 's/://g')" ...

1
2 3 4 5
7