The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
4answers
274 views

echo a loop with variables command

I have several lists and want to run some commands over them. As lists are long I want to run those commands parallel to each other, hence using nohup. For every item I tried to echo a loop that ...
0
votes
2answers
92 views

Supress expansion of * in echo

I am working on a script which dynamically executes some queries on daily basis. These queries are coming from a table in the database. Here is the sample output of the query table: ...
0
votes
3answers
67 views

echo bytes to a file

I'm trying to connect my rasberry Pi to some display using the i2c bus. To get started I wanted to manually write stuff, bytes in particular to a file. How do you write specific bytes to a file? I ...
0
votes
1answer
309 views

using bash script to output new script: need mixture of variables to be replaced and not replaced

I'm having a problem with bash variable substitution. Here's a silly example of what I am trying to do. I need to output a new script from a bash script. A line (see echo in my example) has a mixture ...
0
votes
1answer
76 views

the use for echo without argument in shell scripting

I have a following bash script I encountered on the web that prints the power set of a given lines of elements. p() { [ $# -eq 0 ] && echo || (shift; p "$@") | while read r ; do echo ...
0
votes
1answer
42 views

How to display data in columns in two variables with the same format?

I coded the following to display data formatted in columns: str1='hello i am robert and your ma frnd' str2='thisisaverylongword thisistoohehehe andherefinishthe string hereis a other ...
0
votes
0answers
12 views

How to concatenate an echoed string to include literal single quotes around a value pulled from MySQL? [migrated]

I've run into a slight dilemma when I try to contain a value from an array of data pulled from MySQL inside single quotes. This would normally be a no brainer, but I run into issues since it's inside ...
-1
votes
1answer
58 views

How to get all Users and echo if they work or not?

How do I get a list of users(given from the command line) with grep and output if they are logged/work or not ?
-1
votes
2answers
377 views

Copying a few lines from stdout to stderr - but only if stderr is different from stdout

I have a bash script "backup.sh", which prints out everything to stdout, including all the files that are transferred during backup. I'd like to make it possible to keep that full output, but when ...
-4
votes
2answers
638 views

Redirecting the content of a file to the command “echo”

I have a file named my_file.txt whose content is just the string Hello. How could I redirect its content to the command echo? I know I have the commands less, cat, more... but I need to do it with ...