Questions tagged [output]

The tag has no usage guidance.

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

How can place a newline before EVERY individual character in a file? [duplicate]

Ok, I may just be having a dumbass moment. If so, I apologize. It sounds like a fairly simple task, but I can't get this working: I'd just like to be able to input a string, and place each individual ...
Lee's user avatar
  • 85
1 vote
1 answer
52 views

How to search for strings in the output of previously run commands

Say, for example that after running a number of commands: $ cd /opt/something $ find . -name *aa | grep 11 $ clear $ <more commands go here> there was a part of the output that was needed ...
Sebi's user avatar
  • 999
1 vote
1 answer
61 views

`watch -n 100 'sh script.sh >> /path/to/output/output.txt` doesn't write to output.txt?

I'm currently executing the following: watch -n 100 'sh script.sh >> /path/to/output/output.txt' & It's been running for 30 minutes (I can verify with ps -ef | grep watch), however there's ...
student010101's user avatar
1 vote
0 answers
155 views

Ubuntu sounds issues that get fixed by playing a YT video?

I've been having sound connectivity issue for a while and tried getting to the RCA on a few occasions. I have Ubuntu 22.04 with a Yeti Microphone and CR-X Speakers and two aux ports on my tower (one ...
Alex's user avatar
  • 11
1 vote
0 answers
70 views

Read data from LIS2DE12 accelerometer

I am trying to read the acceleration data in the X, Y and Z axes from the LIS2DE12 accelerometer which is connected to an I2C-to-USB adapter, it is UMFT201XB. I am using a virtual machine in ...
Escris's user avatar
  • 11
2 votes
0 answers
711 views

Secondary monitor not detected by debian, but visible in NVidia-settings utility

The problem I did a fresh install of Debian 11 (Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux) on my Omen 15 (15-en0xxx) laptop. SecureBoot is currently disabled in my UEFI settings to ensure my ...
mor3no_kaffee's user avatar
1 vote
1 answer
1k views

How to output to multiple audio devices at once?

I have multiple audio output devices connected to my desktop including headphones, earphones and speakers. When I use Gnome's GUI to select a new output device the previously selected device stops ...
ment5752's user avatar
2 votes
1 answer
52 views

have clear screen clear konsole ram

how do I set it so clear command clears the output that was stored in ram from my understanding, konsole keeps screen output in ram. I want to clear that when I clear the visible part of the screen ...
stacking and exchanging woohoo's user avatar
3 votes
0 answers
131 views

I want to hide the output when I type in the make command in the terminal

So I'm on Linux and I've been tinkering around with cs50. I've figured out a way to emulate the make command that is used in the course. When I type this make command, a line will print that I would ...
JackChan20's user avatar
10 votes
3 answers
1k views

Temporarily unset bash option -x

I like to use set -x in scripts to show what's going on, especially if the script is going to run in a CI/CD pipeline and I might need to debug some failure post-hoc. One annoyance with doing this is ...
Ken Williams's user avatar
1 vote
1 answer
319 views

Using hostname output in linux with sed

I am trying to use part of the hostname output in Linux and use it in a file using sed. For example, I am using this command as hostname |tail -c 4 which shows me output as last 4 numbers and then use ...
geek12's user avatar
  • 13
2 votes
1 answer
56 views

Properly tabulating 'find's output with printf and sorting them by date

I'm using gfind running on MacOS, to find text files. I am trying to see the filenames only and the birthdate of my gfind results, and then sorting them by date, and paging them. Is this achievable? ...
mariano-daniel's user avatar
1 vote
0 answers
34 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 ...
granttes's user avatar
1 vote
1 answer
432 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 ...
Johnny Canuck's user avatar
1 vote
2 answers
148 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 ...
Enlico's user avatar
  • 1,471
1 vote
4 answers
577 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 ...
Ashark's user avatar
  • 769
4 votes
1 answer
4k 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 ...
halloleo's user avatar
  • 529
3 votes
2 answers
2k 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 ...
michal roesler's user avatar
3 votes
2 answers
5k 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 ...
Ben's user avatar
  • 299
-7 votes
1 answer
249 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 ...
Lahor's user avatar
  • 113
0 votes
1 answer
3k 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 ./...
Dean Meehan's user avatar
2 votes
0 answers
72 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 ...
Johan Ehnberg's user avatar
3 votes
1 answer
378 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, ...
John Riordan's user avatar
0 votes
1 answer
220 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 ...
Gektor's user avatar
  • 3
0 votes
2 answers
37 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 ...
Indermohan Mokha's user avatar
0 votes
1 answer
89 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 ...
Matheus dos Santos Bonifácio's user avatar
0 votes
2 answers
301 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 +'%...
beard black's user avatar
1 vote
3 answers
580 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 ...
netnix99's user avatar
1 vote
2 answers
913 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 ...
user1065145's user avatar
1 vote
2 answers
2k 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 ...
Jannies - They do it for free's user avatar
1 vote
1 answer
4k 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 ...
Rim's user avatar
  • 11
1 vote
3 answers
1k 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 ...
user494791's 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 ...
mcv110's user avatar
  • 13
0 votes
1 answer
348 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; ...
Xiu's user avatar
  • 1
0 votes
1 answer
457 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 :
HM569788's user avatar
4 votes
2 answers
153 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 ...
jah6719's user avatar
  • 43
0 votes
1 answer
391 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:...
Michelle Yang's user avatar
-1 votes
1 answer
500 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....
Vinod's user avatar
  • 155
0 votes
0 answers
196 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 ...
Exper1mental's user avatar
2 votes
2 answers
1k 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 ...
Artur Linhart's user avatar
2 votes
1 answer
597 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: ...
Kannan's user avatar
  • 167
2 votes
0 answers
38 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 ...
Newb Coder's user avatar
0 votes
1 answer
2k 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 ...
Adrian's user avatar
  • 179
1 vote
1 answer
314 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 &...
user419050's user avatar
-1 votes
1 answer
684 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 ...
Naveed Iftikhar's user avatar
0 votes
1 answer
198 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
536 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. ...
Rag's user avatar
  • 69
-2 votes
1 answer
243 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 -...
silviubogan's user avatar
0 votes
0 answers
22 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 ...
variable_expander's user avatar
1 vote
2 answers
523 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 ...
Marco Sirabella's user avatar

1
2 3 4 5
8