Skip to main content

Questions tagged [output]

The tag has no usage guidance.

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

Add user or process information in nftables logs

Hy, Is it possible to customize nftables log's to add more informations ? For example, it could be interesting to get users ( id, gid, ... ) or processes informations that try to out. Example of ...
Pierre B's user avatar
2 votes
1 answer
46 views

GNU parallel: why does diagnostic output look like sequential execution rather than parallel execution?

Scenario: $ cat libs.txt lib.a lib1.a $ cat t1a.sh f1() { local lib=$1 stdbuf -o0 printf "job for $lib started\n" sleep 2 stdbuf -o0 printf "job for $...
pmor's user avatar
  • 619
0 votes
0 answers
34 views

I want to join variables (columns) from two different files with a matching column using join - problems with output [duplicate]

Good day. I am new to linux and really hope someone can help me. I have two files: File 1 : Column1=id_nr; Column2=snp_info File 2 : Column1=id_nr; Column2=recoded_id_nr I want to join the two ...
Michiel Van Niekerk's user avatar
1 vote
4 answers
175 views

How to remove multiple white spaces between words?

grep include /etc/nginx/nginx.conf output: include /etc/nginx/modules-enabled/*.conf; include mime.types; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-...
palmasd1's user avatar
  • 125
0 votes
2 answers
42 views

Changing the response character of the globbing operator ( '**' )

I ran a globbing operator ** in a directory listing ls -d "$PWD/"**/ but I noted that after pressing return… and waiting… and waiting… it regurgitated its answer at once, after generating ...
The DOuGTrainer's user avatar
3 votes
2 answers
382 views

Tail -f | sed. Modify text for color

I am modifying the text following tail -f. I have the following program that monitors a file: tail -vf -c5 /tmp/index \ | cat -n \ | ...
john-jones's user avatar
  • 1,736
-2 votes
1 answer
562 views

ipsweep bash script not working (name or service not known)

I coded a bash script for an ip sweeper however it keeps giving me ths "name or service not known" output. Here is the code : And here is the output when I run the script : Can you please ...
TomPps 1704's user avatar
0 votes
0 answers
27 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
  • 97
1 vote
1 answer
59 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
  • 1,029
1 vote
1 answer
79 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
308 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
115 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
2k 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
2k 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
71 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
192 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
11 votes
3 answers
2k 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
745 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 ...
geek12's user avatar
  • 13
2 votes
1 answer
203 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
37 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
936 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
200 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,677
1 vote
4 answers
860 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
  • 979
6 votes
1 answer
6k views

How to tell "dnf search" to list only matches in the package 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
  • 589
3 votes
2 answers
3k 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
8k 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
308 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
  • 123
0 votes
1 answer
5k 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
86 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
545 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
249 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
114 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
359 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
853 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
1k 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
3 votes
3 answers
4k 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
6k 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
2k 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
485 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
550 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
170 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
633 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
587 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
  • 165
0 votes
0 answers
226 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
878 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
  • 187
2 votes
0 answers
40 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
  • 189

1
2 3 4 5
8