Jay Taylor's notes
back to listing indexPrefix to each output of a command on runtime
[web search]
I am trying to make a modular script. I have several scripts/commands which are called from a single script. Examle: My files are allcommands.sh / command1.sh / command2.sh command1.sh outputs command2.sh outputs allcommands.sh runs the scripts command1.sh and command2.sh I want to prefix each output of these two scripts like this: |
|||||||||||||||
|
|||||||||||||||
I assume that what you are doing in your allcommands.sh is:
Just relace it with
|
|||||||||||||||
|
A minimal example of
With
Quick
|
|
Thanks for the clarifications. Your answer was helpful indeed, but @j_kubik's example was just the one I need.
– Ivan Dokov
Jul 23 '13 at 11:39
|
||||
Your Answer
Not the answer you're looking for? Browse other questions tagged linux command-line bash shell bash-scripting or ask your own question.
asked |
2 years ago |
viewed |
1979 times |
active |
Related
Hot Network Questions
- Is there a difference between a name server lookup and a domain name lookup?
- How to edit the shutter speed value in metadata?
- Why not use tap-off gas for repressurization for a simple rocket engine cycle?
- What's the point in hiring assistant professors instead of more experienced professors?
- Tiny copper waffle squares inside computer
- Is Newton second law covariant or invariant?
- Wait for stdout stream to finish and then add its contents to a file
- How to deal with WPE users
- sending output to /dev/stderr vs. >&2
- Structure of Luke 11:1 has me baffled
- Defining a command to define an asterisk command
- Clean the muddy quartata-fish
- Why do people care about vignetting or distortion?
- What can the government do with its clone army after the war is won?
- What would the effect of removing death saves and just having characters die at 0HP be?
- How can one get all possible sublists of a list?
- Is there a way around a vampire's Sunlight Hypersensitivity?
- The plus-minus sequence
- C++ replacement for C99 VLAs (goal: preserve performance)
- Is there exists a sequence with not countable accumulation point?
- A strong antonym for "dictator"?
- Are sharp keys "bright" and flat keys "dark"?
- Does Ubuntu damage USB drives?
- What is the new probability density function by generating a random number by taking the reciprocal of a uniformly random number between 0 and 1?
Technology | Life / Arts | Culture / Recreation | Science | Other | ||
---|---|---|---|---|---|---|