Questions about either the shell builtin or `/bin/echo`. This tag should not be used if your question is simply about printing to the terminal, only apply it if your question is specific to the `echo` command.

learn more… | top users | synonyms

1
vote
2answers
37 views

How would I loop this command?

A snippet of my code is shown below. The script currently closes if its not able to find the path. [echo "could not find $REPLY, ensure the path is correct and try again"] Instead I would like it ...
0
votes
2answers
78 views

format command output with variable and fixed space

How can I achieve this best maintaining the hierarchy on the left and aligning the size value on the right? Also, at the same time I'd like to round the size to one or two digits. I tried with printf ...
0
votes
2answers
31 views

echoing a variable inside a variable

In my environment, the following variable is set: X=/home so echo $X gives me /home Now I set Y=$X echo $Y gives me $X. If I want to get /home using Y is it possible?
2
votes
1answer
160 views

How to use OSLEC with Alsa as default, not with Pulseaudio or other thirdparty package involved?

Oslec Echo canceller I have seen some packages used OSLEC and there echo cancle was very well. So for a test simulation, how could i install the OSLEC only with Alsa (i do not use PulseAudio at all, ...
0
votes
1answer
58 views

how to send data from serial port to printer?

I have a telephone system that is connected to my old Ubuntu machine and is receiving SMDR data from it. Connected to dev/lp0 is a dot matrix printer, phone system connected to /dev/ttyS0 Currently I ...
0
votes
1answer
49 views

Issues with storing an echo of a date conversion into a string variable inunix

Apologies but this question comes from a question previously raised: How can I convert a local date-time into UTC date-time? Toby has been absolutely great helping me with some conversion string-->BST ...
0
votes
1answer
88 views

How do I add a \n to the end of the record on file using AWK

I have a file that can contain 1 or many lines oracle1.txt oracle2.txt oracle3.txt How do I using AWK put a \n after the last line only so it will show oracle1.txt oracle2.txt oracle3.txt\n I ...
3
votes
0answers
35 views

Why only 4 chars get sent to serial port via command-line

I'm trying to communicate with NodeMCU (CP210x USB/UART) from command-line. However it does not respond to my commands. I have set the correct baudrate via stty 9600 raw. echo ...
3
votes
0answers
330 views

How to create a bash command which creates output that exactly mimics a source text file that can be pasted into bash shell where histexpand is on?

The goal is to create a bash one line command that can be copied and pasted - for instance published on a web forum - and then patches files. See it as a way to distribute a patch file by copy and ...
2
votes
0answers
72 views

Is there a difference between double quoting a variable or a whole line in echo

When you type, for example, echo Variable "$var" is not initialised. and echo "Variable $var is not initialised." the front end result is the exact same (as far as I know, at least). But I was ...
1
vote
0answers
55 views

BASH dd problem

i am trying to learn bash and now im trying to do a script for burning isos. I made the number "4" command to make sure the variables were right. the message i get when i complete my program and ...
0
votes
0answers
21 views

Cannot telnet outside network to open port on OEL 6 machine

I have an OEL 6 server that locally is assigned IP 10.200.15.79. It is hosting a business application that uses port 1031 to send and receive information through TCP/IP. To allow this on the OEL ...
0
votes
0answers
10 views

running command in Mobax Terminal are there plugins that are needed

while read CTFlist; do #next we need to create ctfs padded with zeros as a variable ctfPadded=$(printf ${ctflist}00000000) #then call rc2 key as variable rc2Key="TemporaryRC2Key1" #next create a ...
0
votes
0answers
73 views

Difference between two almost same command

Please consider two following command: $ echo ls | xargs -I cmd echo cmd | source /dev/stdin $ echo ls | source /dev/stdin What's the difference between these commands? In my machine the result of ...
0
votes
0answers
464 views

echo `“hello terminal” > /dev/terminal` - works for /dev/tty[2-5] but not for /dev/pts/n

I'm trying to get to know the input output systems of unix/linux systems better. Since terminals and devices are implemented to interface as ordinary files, I assumed I could on any desired terminal ...
0
votes
0answers
1k views

BC returns syntax error

#!/bin/bash cd ~/simplesim-3.0/benchmarks INSTS=$(grep "sim_num_insn" ./anagram.txt | awk '{print $2}'); IL1_ACCESSES=$(grep "il1.accesses" ./anagram.txt | awk '{print $2}'); IL1_MISSRATE=$(grep ...