Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 views

diff: what does this output indicate?

I am using the following command to log the difference between two files on my disk to a log: diff --color=always -sy --suppress-common-lines --suppress-blank-empty file1.c file2.c >> diff_log....
0
votes
0answers
34 views

Exec Not Updating Values from Certain Bash Functions and Variables When Prepending Script Output

I am logging messages in Bash where I add some useful information to the log message to help provide context. However, in the final output most of my variables and functions appear to only use their ...
1
vote
2answers
42 views

Copy stdout and stderr to a log file, show on console only stderr output and log stderr messages into another file

I have a situation I need the output redirection in a bash script in the following way: On the console only errout messages should be shown Errout messages should be also logged into one specific ...
3
votes
1answer
40 views

How capture MySQL result metadata in a file when run from shell script

I am running a MySQL script file from a shell script in Linux (CentOS 7). While I can capture the result in a file, I am not able to capture result metadata. Example: My test.sql file looks like this: ...
2
votes
0answers
15 views

How do I make a secondary readable text file next to the rawlog file, like it would appear when you type in “savelog” manually in terminal?

The question comes from this question here: Save all the terminal output to a file, specifically this post: https://unix.stackexchange.com/a/323920/478293 but I can't post a comment on there asking ...
0
votes
1answer
34 views

What are LPF and Socket/fallback in the output of dhclient -v?

Below is some sample output of that command: $ sudo dhclient -v Internet Systems Consortium DHCP Client 4.4.1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please ...
1
vote
1answer
42 views

How to check if command had any output (zsh)

I want to print a new line after a command if it had any output (I hope that this will make it more readable once my terminal starts scrolling). I found this: precmd() { precmd() { print &...
-1
votes
1answer
38 views

Read variable inputs and replace the template file with variable values

In a linux shell scripts, I am reading input for some variable values. Based on these Variable values, I need to change template file with the input. For example. I have a file hello.txt with the ...
0
votes
0answers
25 views

Why is my message not displayed?

I have a following script: #!/bin/bash set -euo pipefail IFS=$'\n\t' CIRCLE_USERNAME="${1:-}" CIRCLE_BUILD_URL="${2:-}" CIRCLE_JOB="${3:-}" CIRCLE_PROJECT_USERNAME=&...
0
votes
1answer
28 views

How to have find feature `-printf` print out into stderr

Is it possible somehow find feature -printf print out at the moment it's used into stderr ?
1
vote
1answer
40 views

Redirect outputs to different columns of the same file

I have a series 5 of commands working on several files located in several sudirectories. Suppose I want to redirect the output of every command as a new column in the same file, how can I do that. ...
-2
votes
1answer
86 views

How to make sftp output a working sftp prompt after the connection from CLI arguments is created?

I get a program that stays in input state, the user can type characters but they are useless. The following are the command and the output. After this, the terminal prints the keys pressed. ~  sftp -...
0
votes
0answers
12 views

Submitting Several R Jobs at Once to HPC

I currently have the below R script by <- 0.1 s1 <- seq(4, 5, by = by) for (i in s1) { system(sprintf("sbatch --export=ALL,START=%.2f,END=%.2f my_R_file.sh", i, i + by)) } which ...
0
votes
0answers
20 views

How to expand variables inside read without envsubst, arguments or heredocuments (and without any non shell-builtins)? [duplicate]

Perhaps I have misunderstood Stéphane Chazelas's answer here so I ask another question. In Bash desire to expand variables inside read without envsubst, arguments or heredocuments (and without any ...
1
vote
0answers
80 views

Only one HDMI port recognized on USB-C dock

I've gotten my hands on a JCD543 and only the HDMI/DP combination port is detected on my carbon x1 5th gen running linux while the secondary HDMI and VGA port are not. $ dmesg -w [337962.676809] pci ...
0
votes
3answers
25 views

Unable to get the nth column data due to changing output of uptime command

Below is the output of uptime from Solaris where I am extracting the third last column: uptime 8:30pm up 23 day(s), 17:46, 5 users, load average: **2.79**, 1.79, 1.53 I always need to get the ...
0
votes
3answers
29 views

Formatting command output that is a long single line

I am working on vxlan tunneling between Linux - commercial routers. I need to debug some interface settings. The command sudo ip -d link show DEV gives me a great output but the output format is like ...
0
votes
1answer
24 views

Get the output of a remote ssh to local

I'm able to get the output of a failing lp command from a remotehost to my local script like below: until ssh -q root@remotehost 'lp -d Brother_HL_L2350DW_series /root/moht/Printed/`basename "$...
0
votes
0answers
24 views

How to grab output of a remote ssh command with until-loop in a variable

Below is my until loop that fires a printer command to a remote host using ssh until ssh root@45.76.165.127 'lp -d Brother_HL_L2350DW_series /root/moht/Printed/`basename "$FILE"`' do echo &...
0
votes
1answer
51 views

How do I print slurm variables to standard slurm output?

I want to print the following variables to the standard output file slurm-XXXXX.out produced by Slurm. Right now, I am generating a separate .info file for every job. echo "SLURM Job ID : $...
1
vote
0answers
30 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
52 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
27 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
25 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 ...
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
33 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
262 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
52 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
240 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
2answers
30 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
99 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
25 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
72 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
536 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
251 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
59 views

Output of lsblk includes both pipes and back ticks

sda |-sda1 ntfs Recovery F49E60439E5FFD0C |-sda2 vfat ...
1
vote
1answer
210 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
491 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
1answer
20 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
46 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
71 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
207 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
33 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
32 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
2answers
126 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
258 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
11k 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
1answer
36 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
944 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
389 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 ...

1
2 3 4 5
8