10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My script reads all the log files in a directory, the user would enter a range and the script would only display the files within those range. Here's my code:
#!/bin/bash
LOG_FILES=("Sandbox/logs/*")
for file in ${LOG_FILES}; do echo $file; done
-------------
for i in $(seq $1 $2); do... (1 Reply)
Discussion started by: Loc
1 Replies
2. Shell Programming and Scripting
Gents,
It is possible to generate a range of values according to column 1 and count the total of rows in the range.
example
input
15.3
15.5
15.8
15.9
16.0
16.1
16.8
17.0
17.5
18.0
output desired
15.0 - 15.9 = 4 (10 Replies)
Discussion started by: jiam912
10 Replies
3. Shell Programming and Scripting
Dear All,
I am stacked and I ask for your help.
Briefly, I have two files, one like this one (file1):
1 101 5
1 102 6
1 103 2
1 104 9
1 105 10
2 301 89
2 302 4
2 303 13
2 304 34
2 305 1
and the other like this one (file2):
1 103
2 303well, what I am trying to do is obtain a... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
4. Shell Programming and Scripting
I have a list of columns with values that I need to transform into a row containing the range of each column. For example:
"Column A"
1
2
3
4
10
12
14
15
16
17
18
"Column B"
1
4
5
6 (4 Replies)
Discussion started by: newbio
4 Replies
5. UNIX for Dummies Questions & Answers
Hi Forum.
I tried to search the forum for an answer but couldn't find it.
I have the following files in my directory:
PROFILE_TXN_61647.dat
PROFILE_TXN_61648.dat
PROFILE_TXN_61649.dat
PROFILE_TXN_61650.dat
PROFILE_TXN_61651.dat
PROFILE_TXN_61652.dat
PROFILE_TXN_61653.dat... (8 Replies)
Discussion started by: pchang
8 Replies
6. Shell Programming and Scripting
I have a script to do a couple simple but repetitive commands on files that are provided to us. One of the things is to get rid of the line feeds. This is the section that is causing problems, i even cut this section into its own file to make sure nothing else was affecting it.
#!/usr/bin/bash... (4 Replies)
Discussion started by: oly_r
4 Replies
7. UNIX for Dummies Questions & Answers
My input file is
N3*123 ABC FLATS~ REF*D9*10000000001~
N3*223 ABC FLATS~ REF*D9*10000000002~
N3*323 ABC FLATS~ REF*D9*10000000003~
N3*423 ABC FLATS~ REF*D9*10000000004~
N3*523 ABC FLATS~ REF*D9*10000000005~
N3*623 ABC FLATS~ REF*D9*10000000006~
N3*723 ABC FLATS~ REF*D9*10000000007~
N3*823... (2 Replies)
Discussion started by: nsuresh316
2 Replies
8. Shell Programming and Scripting
I have results from some statistical analyses.
The format of the results are as given below:
I want to select lines that have a p-value (last column) less than 0.05 from all the results files (*.results) and cat to a new results file.
It would be very nice if a new column is added that tells... (2 Replies)
Discussion started by: genehunter
2 Replies
9. Shell Programming and Scripting
Hi All,
I've got a script to output YAML data, and I want to display data that's held inside variables inside one large CAT area. What's the easiest way to do this?
cat << "END"
---
classes:
- general_image
- $intro #Variable 1
- $mid #Variable 2
... (2 Replies)
Discussion started by: glarizza
2 Replies
10. UNIX for Dummies Questions & Answers
Gentle Unix users,
Can someone tell me how I can use a combination of the cat and grep command to display records that are in FileA but missing in FileB.
cat FileA one line at a time and grep to see if it is in fileB. If it is ignore.
If line is not in fileB display the line.
Thanks in... (4 Replies)
Discussion started by: jxh461
4 Replies