Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
4 answers
64 views

How to prevent child process to interfere with bash prompt?

The application in question is DaVinci Resolve. I start it from terminal. And when I close it, the message "Socket Disconnected" from the app is written to the terminal output. Then the bash ...
user avatar
  • 382
0 votes
1 answer
64 views

How to tell "dnf search" to list only matches in the pacakge name (or name and summary), but not only in the summary?

On RHEL/CentOS the package manager dnf can search for strings in the names and summaries of packages. How can I tell it to list only matches in the name (or in name and summary), but not in the ...
user avatar
  • 315
0 votes
1 answer
58 views

PERMANENTLY change the output format of the 'date' command in my Kali Linux

So I have 2 different Linux installations. One of them is Ubuntu and the second one is Kali. When I run date command with no options/arguments on my Ubuntu install I get: michal@ubuntu:~$ date Thu 24 ...
user avatar
2 votes
2 answers
330 views

Prepare shell script for output to file and console

I know that there is a possibility to use tee to copy the contents of output to a file and still output it to the console. However, I can't seem to find a way, to prepare shell scripts (like a fixed ...
user avatar
  • 123
-7 votes
1 answer
104 views

What is the difference between lynx and pandoc? [closed]

In this thread I was suggested to do an action with lynx or pandoc. To my understanding, both programs can output an all backend and solely or primarily textual webpage, in console, pretty much as ...
user avatar
  • 115
0 votes
1 answer
30 views

Piping the results from an SSH command to be saved locally [duplicate]

I've the following command in a script that I want to run that will happily output the result of all the remote commands to STDOUT on the console. ssh -t my-server1.my-domain.net << EOF ./...
user avatar
1 vote
0 answers
25 views

Is there any handy way to follow multiple piped commands' status output

Let's say I have serverA with a block device, the contents of which I want to move to serverB's block device via the computer I am working on as a relay. This is very handy with pipes, buffers, dd and ...
user avatar
2 votes
1 answer
47 views

Output to variable or file using (find with -exec and shred)

I have a find command that I exec to shred and it works great; however, I need to capture the output of this and pass to a variable or a file. I have tried so many iterations of the below commands, ...
user avatar
0 votes
1 answer
42 views

Assigned variable has empty output from nslookup and ping commands

I am trying to assign an resolved IP address to variable: ip=$(ping -q -c1 -W1 google.com | grep -Eo "([0-9]+\.?){4}" | head -n 1) | echo $ip or ip=`resolveip google.com | head -n 1` | echo ...
user avatar
  • 3
0 votes
2 answers
34 views

When looking at subdirectories, skip one directory

I have a directory /u01/oracle/folders with these subfolders: [root@ricusesasctl01vm tax_receipts]# ls -ltr total 64 drwxr-xr-x 5 OICDev1 oic 4096 Mar 1 2021 Argentina drwxr-xr-x 5 OICDev1 oic 4096 ...
user avatar
0 votes
1 answer
45 views

Expand input, output or error

What I want to do is to ask the user to enter one line and send to standard ouput. I tried get the input to carry out a conditional question, but there's no way to expand a input (in this case is ...
user avatar
0 votes
2 answers
70 views

bash function does not show me date or cat arguments completely [duplicate]

I am writing a bash script for backup with log storage. I use my defined function as follows: logit () { echo " $1 $2 " >> /path/to/log } For logit 'Starting Backup' $(date +'%...
user avatar
1 vote
3 answers
92 views

Is there a way to format output with grep or egrep with a separator between instances of the output?

I have a dataset that has a large amount of data in it: ID Number: A00001 Name: John Smith Address: 123 Any Street City: AnyTown State: Ohio Zip: 12345 ID Number: A00002 ...
user avatar
0 votes
2 answers
100 views

Capture normal (stdout) output along with error (stderr) output

There is a script run via cron with the following line: 0 * * * * (/var/script.sh | tee -a /var/script.log) How do I rewrite the cron entry to capture both normal stdout and error stderr output? They ...
user avatar
0 votes
0 answers
44 views

Preventing terminal output race of a Bash' sub process by `>( )` and its following command

How do we prevent terminal output race between a Bash' sub process by >( ) and command following it when this sub processing a large number of lines so most of its output lag behind the output of ...
user avatar
1 vote
2 answers
338 views

Save all terminal output to a file, after the fact

This: Save all the terminal output to a file Except after the fact. Meaning that instead of preparing to record or pipe all output to a file, I am dealing with output that has already taken place, and ...
user avatar
0 votes
1 answer
367 views

Showing and saving the output of a python file run through bash

I'm new to the world of linux and programming so my question may be very basic but I can't find an answer anywhere. I'm running a python file (to do a regression so I'm expecting tables as result) on ...
user avatar
  • 1
2 votes
3 answers
287 views

Is there a way to send all shell script output to both the terminal and a logfile, *plus* any text entered by the user?

I want to send output of a shell script, including user-entered text, to the terminal and a logfile. I thought some combination of tee and exec might do it, but I’ve had no luck so far. I know tee by ...
user avatar
0 votes
0 answers
32 views

awk output not in columns when moved to log [duplicate]

I have an awk command piped to the output of another command | awk {'print $2,$3'}. When I run this command the output displays the data in columns, of the columns as I would expect column2 column3 a ...
user avatar
  • 13
0 votes
1 answer
59 views

How can I generate .out file within a shell script?

I wasn't sure how to word this question but basically I have been using a shell script to process sam data. Here's the shell script. nano picard_SortandIndex_from_sam.sh for A in *sam; do ls $A; ...
user avatar
  • 1
0 votes
1 answer
133 views

Print output of grep command to indent lines as waterfall model

My grep output , should display lines with increment of indent by one in each subsequent line. grep command output is :
user avatar
4 votes
2 answers
103 views

Search File A with Terms from File B and save output to individual TXT files based off search term from File B

FILE-A has 100,000 lines. FILE-B is 50 search terms. I'm looking to complete the search of FILE-A (CSV or TXT) with the various terms from FILE-B (CSV or TXT) AND -- here is the kicker -- save the ...
user avatar
  • 43
0 votes
1 answer
47 views

What does this bcf error mean?

I ran this code to filter out biallelic variants from my vcf file: bcftools view --max-alleles 2 --exclude-types indels merged.ecDNA.vcf.gz>merged.ecDNA2.vcf.gz However, I got an error message: [E:...
user avatar
-1 votes
1 answer
58 views

diff: what does this output indicate? [duplicate]

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....
user avatar
  • 133
0 votes
0 answers
70 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 ...
user avatar
1 vote
2 answers
162 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 ...
user avatar
2 votes
1 answer
132 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: ...
user avatar
  • 167
2 votes
0 answers
28 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 ...
user avatar
0 votes
1 answer
492 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 ...
user avatar
  • 159
1 vote
1 answer
101 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 &...
user avatar
-1 votes
1 answer
78 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 ...
user avatar
0 votes
1 answer
42 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 ?
user avatar
1 vote
1 answer
156 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. ...
user avatar
  • 69
-2 votes
1 answer
119 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 -...
user avatar
0 votes
0 answers
21 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 ...
user avatar
1 vote
1 answer
221 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 ...
user avatar
0 votes
3 answers
33 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 ...
user avatar
  • 297
0 votes
3 answers
45 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 ...
user avatar
0 votes
1 answer
45 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 "$...
user avatar
  • 297
0 votes
1 answer
258 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 : $...
user avatar
  • 103
1 vote
0 answers
52 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 ...
user avatar
  • 21
0 votes
1 answer
61 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 ...
user avatar
14 votes
2 answers
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:~...
user avatar
2 votes
1 answer
333 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 ...
user avatar
  • 926
0 votes
1 answer
87 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+...
user avatar
  • 3
3 votes
1 answer
319 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 ...
user avatar
  • 262
0 votes
2 answers
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 ...
user avatar
0 votes
1 answer
181 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 ...
user avatar
0 votes
1 answer
26 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=...
user avatar
  • 24.7k
0 votes
4 answers
132 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 ...
user avatar
  • 11

1
2 3 4 5
8