Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
3answers
106 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
0answers
17 views

libgpiod get the state of an output?

gpioset works but gpioget converts the line to an input instead of an output. What's the point of removing sysfs if apps have to re-make it for state tracking. Anyone know how to read the state of an ...
0
votes
1answer
13 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 ...
0
votes
0answers
33 views

My laptop won't recognise that it has an hdmi output. How do i fix it?

I've seen other topic with similar questions here, but none of their solutions worked and many were quite old already. I am using Kubuntu 20.04. My laptop doesn't recognise that it has an HDMI ...
1
vote
2answers
30 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
30 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
86 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
32 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
28 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
0answers
77 views

Simultaneous audio output for bluetooth device and audio jack using blue alsa

I would like to have a simultaneous audio output to a connected bluetooth speaker and the normal audio jack at the same time. The audio output via the bluetooth works already, but I can't get it ...
0
votes
2answers
41 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
66 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
1k 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
0answers
20 views

How do I interpret `flatpak install` output?

I'm simply trying to install Spotify with flatpak install spotify. Here's the output: Looking for matches… Found similar ref(s) for ‘spotify’ in remote ‘flathub’ (system). Use this remote? [Y/n]: y ...
0
votes
0answers
15 views

expect redirect incomplete output in rhel 7.5

Can any one help me out with redirecting shell out. [root@localhost automation]# vi cs300.sh #!/usr/bin/expect -f set timeout -1 spawn ssh Monitor@172.30.19.96 expect "Password" send "Password\r" ...
0
votes
1answer
27 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
70 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
76 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 ...
0
votes
1answer
53 views

why executing ls > empty.txt shows me empty.txt inside empty.txt in an empty folder?

why in an empty folder executing ls > empty.txt shows me empty.txt inside empty.txt ? it is not poetry, it is true and I do not know why. For me, they way to think ls > empty.txt is the ...
0
votes
0answers
28 views

How to send program audio to different outputs

I was searching on forums about this and i couldn't find a real answer to my specific problem, so i decided to try to post it here. I was wondering if it was possible to send the sound output from ...
0
votes
2answers
70 views

Terminate process upon specific output

How can I terminate a process upon specific output from that process? For example, running a Java program with java -jar xyz.jar, I want to terminate the process once the line "Started server on port ...
0
votes
1answer
66 views

How to display only extracted files with tar, not the ones which are not extracted /not overwritten?

I'm extracting a tar archive with tar -xf /tmp/update.tar -C / -v --keep-newer-files. The -v Option is to display all files processed, the --keep-newer-files Option is self explaining. Due to all ...
0
votes
0answers
372 views

Git Bash: “No such file or directory” after creating directory and trying to create a file

I am trying to get to a point where I have a GIT alias to make things a little quicker. I am getting an output of files changed in our repository so we can do some scanning of those files. I want to ...
2
votes
2answers
103 views

Easiest way to get `+` indented `tree` output

I need to replace indentation in tree output with + signs so that instead of this: $ tree --noreport dir dir ├── dir1 │ ├── file1 │ └── file2 └── dir2 ├── file1 └── file2 it'd print this:...
0
votes
0answers
17 views

M04635:55:000000000-CN24V:1:1101:11659:1906 1:N:0:26 111 0 111 0 meaning for trimmomatric file?

this is the output for the log file of trimmomatric which has been run in linux M04635:55:000000000-CN24V:1:1101:11659:1906 1:N:0:26 111 0 111 0 i want the meaning of these
1
vote
1answer
48 views

grep multi text file input and create diferent output each file

i have script that filter several text file using grep and awk in loop, my issue is when create output to each file after filtered, this my script: grep_multi.sh path=$(find /home/folder/file/...
0
votes
1answer
36 views

grep of executable commands with variable

Have a file with thousands of lines like so : echo " device " ; login 'command' ip > device_command" $(date +"%Y_%m_%d_%I_%M_%p")".txt I run my script like so: ./script.sh | grep "device" ..in ...
1
vote
1answer
221 views

How to save command line screen output in Linux after running program?

I ran a program that has a good amount of command line output, and it ran on a screen in a ssh server. I referred to this post so that I can scroll through the screen and see the output, but there is ...
3
votes
0answers
43 views

Why does my touchpad stop working when I plug in my (normal, non-USB) headphones?

It's the darnedest thing. And only started happening within the last two days. Whenever I plug in my 3.5mm AKG headphones into the appropriate spot on my Acer Chromebook 15 CB3-532 running Ubuntu 18, ...
0
votes
1answer
216 views

Clean formatting of output within bash scripts

I ran across a problem formatting the output during runtime while preserving the format of the code in some scripts. The below works for me, just wanna check that it's reasonable? It seems to dirty up ...
2
votes
4answers
1k views

Next command output on the same line? Bash script

I have the following simple script: echo "-------------------------- SOA --------------------------------" echo " " echo -n " ---------> "; dig soa "$1" +short | awk '{print $3}' The output is ...
1
vote
1answer
89 views

Grep: separate output into two column and save them into txt file

In a directory, after running ls -d -- 0.*_*.txt | sort -t. -k1, I obtained output filenames such as 0.230_0.203059.txt How can I further writing each of them into two columns like 0.230 0.203059 ...
0
votes
1answer
674 views

Sybase query: save output to a file

I´ve created the following script: #!/bin/bash isql -U databasename_dba -P password -b <<EOF! select quantity, date from name_table where numer_id="1234" go quit EOF! ...
0
votes
2answers
96 views

Print lines between two patterns, pausing until keypress after each chunk

My sed or awk can print line between two patterns, but how can I make it display one by one? Example - It should display the first part of the output, and when I press Space it should display the 2nd ...
0
votes
1answer
591 views

How can I search terminal output?

Say I type git help to learn about the merge command. I don't want to read all the output just the lines that contain merge and their surrounding lines. I thought this would be a common question but ...
1
vote
1answer
100 views

Output fdisk bash command to multiline variable

I can't seem to figure out how I can put a fdisk command from a bash script in a multiline variable. Here is my code hdds="$(sudo fdisk -l | grep "Disk /dev/sd" | awk '{print$2}' | sed 's/://g')" ...
0
votes
2answers
43 views

Echo shell log while entering and then exit

While I type a command, this command will authenticate with a remote server and do a bunch of things. If pass, it will give me a bash shell with its environment. My goal is to save these log which ...
0
votes
1answer
72 views

GRUB 2.02 - no output in command line mode

When I am entering GRUB bash-like console mode and entering commands ls ls -lh to show available partitions there is no output. Following similar question @ Unix&Linux Stack, I already turned off ...
1
vote
1answer
2k views

awk save value as variable

I use the command varioutput=$(awk '{print $j}' OFS=, data/damper.test_temp1.csv) because I want to extract the j th value of a line of many values seperated by , . But when I want to use $...
0
votes
1answer
77 views

Find string and make it bold in output E-mail

i have below code which check status of some services on linux rhel 7 and send email (output is different service status). i want to make specific string called "up" and or "NOT up" in bold and with ...
0
votes
1answer
48 views

Formating grep output [closed]

I have website on my hard drive that I need to locate keywords within the HTML files, then output to an html file, listing each find on a new line. Currently i'm useing the line below, but the output ...
0
votes
2answers
122 views

Maintain color from script output for later viewing

I want to save the output from a script so I can view it later. However, when I save the output to a file (script > some/file) and view it later, there's no color, even though script originally ...
0
votes
1answer
62 views

How to choose between sound outputs without unplugging hardware?

I am currently running the following: 4.15.0-46-generic GNU/Linux Distributor ID: LinuxMint Release: 19.1 Codename: tessa I have my headphones plugged into their dedicated port, however, I ...
0
votes
1answer
85 views

Running command on each line of output immediately [duplicate]

I found out that when I run a command which executes a software that has continuous output lines e.g. traffic monitor like tcpdump or tshark the command keeps counting numbers on screen like 4, 8, 12 ....
1
vote
1answer
87 views

How can I know the type of each element in the output of ls -l?

I was checking what exactly each field is in the output of ls -l. The example in this post solves my question. But again I'm wondering what type of each field is. The strings are obvious. But how ...
1
vote
1answer
119 views

Show only the really extracted (non-skipped) files using tar

I'm extracting daily backup archives. I want to see only the new files since the last day. The archives contain lot of already existing files, which I don't want to overwrite, so I use the --skip-old-...
0
votes
2answers
84 views

Showkey with timestamp

How can I record keyboard actions with the timestamp, either to console, or preferably to a file? I have showkey output like: keycode 28 release keycode 30 press keycode 30 release keycode 48 ...
-3
votes
1answer
581 views

CTRL+D vs CTRL+C

Is it true to say that CTRL+D stops input execution while CTRL+C stops output displaying (as plain data, without execution)?
5
votes
1answer
930 views

What's going on with this dash '-' thing?

I was trying to export the Python environment requirements and this is what I intended to do: conda list -e > requirements.txt However I mistakenly typed this instead: conda list -e -> ...
0
votes
1answer
647 views

make json from SQL query output

I have this query: select hostname,size from tableinfo output is like this: hostname size ------------------------- ----------- host1 28 host2 ...

1
2 3 4 5
7