9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
2. Shell Programming and Scripting
Looking to add text to a file, example
File example;
nodegroups:
check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com
I need to take a file with a one line list of hosts separated by commas
host.domain.com,host2.domain.com,host3.domain.comand prepend the string " ... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies
3. Shell Programming and Scripting
Hello,
Is possibly there a way to prepend the filename to its content without a third file? The reason is to add a header to each file contents to distinguish each other when they are pasted side-by-side.
sample.txt:
XLOC_001 0
XLOC_002 23
XLOC_003 4
XLOC_012 6output (with the same... (4 Replies)
Discussion started by: yifangt
4 Replies
4. Shell Programming and Scripting
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies
5. Shell Programming and Scripting
Hi,
I have a process which outputs to a log.
Below is the code snippet:
process &> $LOGFILE&
The log file keeps on updating whenever a transaction is processed.
The log file has a time stamp added so every time I kill the process and start the process a new log file is... (4 Replies)
Discussion started by: rajkumarme_1
4 Replies
6. Shell Programming and Scripting
Currently I am redirecting STDERR and STDOUT to a log file by doing the following
{
My KSH script contents
} 2>&1 | $DEBUGLOG
Problem is the STDERR & STDOUT do not have any date/time associated.
I want this to be something that i can embed into a script opposed to an argument I use... (4 Replies)
Discussion started by: nitrobass24
4 Replies
7. UNIX for Advanced & Expert Users
Hi All,
i have a .Csv file in the below format
startTime, endTime, delta, gName, rName, rNumber, m2239max, m2239min, m2239avg, m100016509avg, m100019240max, metric3min, m100019240avg, propValues
11-Mar-2012 00:00:00, 11-Mar-2012 00:05:00, 300.0, vma3550a, a-1_CPU Index<1>, 200237463, 0.0,... (9 Replies)
Discussion started by: mahi_mayu069
9 Replies
8. Shell Programming and Scripting
I want to print out a directory listing, then append ] to the end of each line. I'm trying to create a list of Wiki links based on folder listings that i can just copy and paste without having to edit 100's of file listings.
Using sed i've figured out to do something like this:
sed... (4 Replies)
Discussion started by: CapnDoody
4 Replies
9. Shell Programming and Scripting
How can i prepend the content of a file to another file? I tried:
sed '1r textfile' myfile
but it inserted the text AFTER the first line? What would be a good method?
I can easily append lines to a file using the ">>" operator, is the something similar in bash to prepend lines?
Kind regards... (2 Replies)
Discussion started by: Christoph Spohr
2 Replies