I have been searching the web, and these forums for help. I will try my best to explain the issue, and what my desired results are.
I am doing queries in MYSQL, and need the output to be sent to a file. That file needs to have things with the same ID on the same line. To give you an idea, if I query the names of drinks, it may come out like this:
How would I get the output to be like this:
Here is some sample output from the script I am working on:
sample output:
How can I get this to put everthing on three lines? Notice that there are only three different ID's (9991, 9992, 9993). Ideally, I would want something like this:
Notice that everything is on one line now. The first two columns are the same (9993 and 10.10.50.0/24). So it kept those and then put everything after that comma delimmited.
I want to output screen messages to a logfile when executing an automated script. I have tried the script and command to do this but with no luck.
Thanks,
Nicole (5 Replies)
Hello All,
I am using the below code:
#!/bin/sh
/omp/bin/TICLI "op:alarm,all" > filename
for getting command output and then putting the output into newfile but the problem is this, that not the complete output goes into newfile and the script stops.
for example: if this commands gives... (18 Replies)
Hi,
I want, if a line is more than 80 characters length then put a new line with 4 space after each 80 characters to indent the data at same position.
Input:
200 Geoid and gravity anomaly data of conjugate regions of Bay of Bengal and Enderby Basin: New constraints on breakup and early... (3 Replies)
Hi,
I want to make sed write a part of fileA (first 7 lines) to file1 and the rest of fileA to file2 in a single call and single line in sed. If I do the following:
sed '1,7w file1; 8,$w file2' fileA
I get only one file named file1 plus all the characters following file1. If I try to use curly... (1 Reply)
How to redirect the output to multiple files without putting on console
I tried tee but it writes to STDOUT , which I do not want.
Test.sh
------------------
#!/bin/ksh
echo "Hello " tee -a file1 file2
----------------------------
$>./Test.sh
$>
Expected output:
-------------------... (2 Replies)
I have a string with escape differentiators as a result of searching for a file using find. Essentially find returned to my shell variable several absolute paths each ending with the file name and each path/file separated by \n.
Echo recognizes the escape sequence and is able to print the paths... (3 Replies)
do you have any simple script on how to change the color and font of a string in a script example
echo "===================================="
echo " sample color script"
echo "===================================="
echo " hello "
echo " bye"
on hello,... (3 Replies)
Hi guys,
Just want to ask how can I make a script that will perform like this.
1. Execute the command
2. Then the output of the command will be redirected to a file
2. The file that has been created will have a date on it equivalent to the date and time it was created (or maybe after the... (5 Replies)
I am revisiting the problem of sentence splitting. I have a Perl Script which splits a para into sentences, but acronyms and short forms create an issue
#!/usr/bin/perl
use feature qw/say/;
use strict;
use warnings;
my $s;
my @arr;
while(<>) {
chomp $_;
$s .= $_ . " ";
}
@arr... (2 Replies)