Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

How can I mirror the output of my iMac's terminal to a physical terminal using serial?

I would like to mirror my iMac's termina onto my Lear Siegler ADM 5 terminal and control it from there. I have a usb to to DB25 cable attached to the extension port on the terminal, but just not sure ...
0 votes
1 answer
43 views

output filename and 'found string' on same line in output file

Semi-newbie. Trying to automate something using an awk script. Should be simple - in theory. Set of files, all ending in .lst. In each file there is a single line (out of hundreds) with a particular ...
0 votes
0 answers
29 views

How to make Dummy Ouput appear?

Two months ago I've switched to Ubuntu after being away from Linux for a while. I made the install and everything worked perfectly, except for sound, which appeared as "Dummy Output". I don'...
  • 1
0 votes
2 answers
49 views

How can I obtain a full tabular list of the running process on my system (with their command name and PID at least) for text processing consumption?

When I run top I see a screen similar to this, PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 654 root 20 0 25.5g 147780 70084 S 3.7 0.9 72:08.69 ...
  • 1,066
0 votes
4 answers
151 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 ...
  • 482
2 votes
1 answer
616 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 ...
  • 427
1 vote
1 answer
231 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 ...
2 votes
2 answers
1k 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 ...
  • 293
-7 votes
1 answer
140 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 ...
  • 115
0 votes
1 answer
311 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 ./...
1 vote
0 answers
34 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 ...
2 votes
1 answer
151 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, ...
0 votes
1 answer
83 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 ...
  • 3
0 votes
2 answers
36 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 ...
0 votes
1 answer
65 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 ...
0 votes
2 answers
123 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 +'%...
1 vote
3 answers
188 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 ...
1 vote
2 answers
342 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 ...
0 votes
0 answers
45 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 ...
's user avatar
1 vote
2 answers
925 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 ...
0 votes
1 answer
1k 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 ...
  • 1
2 votes
3 answers
612 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 ...
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 ...
  • 13
0 votes
1 answer
146 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; ...
  • 1
0 votes
1 answer
229 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 :
4 votes
2 answers
111 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 ...
  • 43
0 votes
1 answer
107 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:...
-1 votes
1 answer
145 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....
  • 133
0 votes
0 answers
117 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
2 answers
533 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 ...
2 votes
1 answer
241 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: ...
  • 167
2 votes
0 answers
33 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
1 answer
774 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 ...
  • 159
1 vote
1 answer
125 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
1 answer
159 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
1 answer
67 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 ?
's user avatar
1 vote
1 answer
240 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. ...
  • 69
-2 votes
1 answer
129 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
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 ...
1 vote
1 answer
288 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
3 answers
39 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 ...
  • 407
0 votes
3 answers
91 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
1 answer
83 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 "$...
  • 407
0 votes
1 answer
449 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 : $...
  • 103
1 vote
0 answers
65 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 ...
  • 21
0 votes
1 answer
64 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 ...
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:~...
2 votes
1 answer
355 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 ...
  • 956
0 votes
1 answer
99 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
3 votes
1 answer
366 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 ...
  • 259

1
2 3 4 5
8