10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I have a requirement to list all the files in chronological order based on the date value in the file name.For ex if I have three files as given below
ABC_TEST_20160103_1012.txt
ABC_TEST_20160229_1112.txt
ABC_TEST_20160229_1112.txt
I have written code as given below to list out... (2 Replies)
Discussion started by: ginrkf
2 Replies
2. Shell Programming and Scripting
Hello ,
I have to write a bash script. I will explain the logic based on a scenario.
Scenario :
Suppose I have few files in a Folder X :
FILE_201508.list
FILE_201510.list
FILE_201507.list
abc_201510.csv
xyz_201508.csv
abc_201507.csv
def_201507.csv
1) Now ,... (3 Replies)
Discussion started by: smamrm
3 Replies
3. Shell Programming and Scripting
Below is the part of contents of a file
cat outputFile.txt
:APP-MS-service_monitoring-118054-DiskFilling-S
Description=Disk is getting filled.
If Condition=If Event/Log Level(ANY) and matching substring "DiskFilling" Log: xx.x.x..xx.: 4 days 1:33:54.42
Date and time=03-18-2013... (2 Replies)
Discussion started by: vivek d r
2 Replies
4. Shell Programming and Scripting
Oracle Enterprise Linux 6
This is my file. Two fields separated by space
$ cat testfile.txt
MARCH9 MARCH4
MARCH1 MARCH5
MARCH2 MARCH326
MARCH821 MARCH7
MARCH6 MARCH2
$
$
The following numeric sort, based on the first field's 6th character works as expected.
$
$ sort -n -k 1.6... (7 Replies)
Discussion started by: John K
7 Replies
5. Shell Programming and Scripting
Hi team,
We have few files landing to our server based on sequence number. These files have to be processed in the sequence number order. Once the sequence number has reached its maximum, the files with sequence number 0000 has to be processed.
For example:
IN9997
IN9998
IN9999
IN0000... (7 Replies)
Discussion started by: anijan
7 Replies
6. Shell Programming and Scripting
Hi,
I want a flat file(pipe delimited) to be sorted based on 2nd column only. Below is input file to be sorted.
AVERS|K50034|A|Y|N|N|Y|Y|Y|||N|N
AVERS|K50035|A|Y|N|N|Y|Y|Y|||N|N... (11 Replies)
Discussion started by: Nikhath
11 Replies
7. Shell Programming and Scripting
the below is sorted as it is. the fields that i'm interested in are the 4th and 5th field.
i want to sort the based on the 4th field.
my past attempt to do this was to do something like this:
awk '{print $4}'| awk '{print $1":"$2}' datafile | sort | uniq
however, if i do that, i lose... (2 Replies)
Discussion started by: SkySmart
2 Replies
8. Shell Programming and Scripting
the thing which i require is very very complex.. i tried hard to find the solution but couldnt..
the thing i need to achieve is say i have a file
cat delta.sql
CREATE VIEW Austin
Etc etc
.
.
.
CREATE VIEW Barabara
AS
SELECT blah blah blah
FROM Austin z, Cluster s, Instance i
WHERE... (4 Replies)
Discussion started by: vivek d r
4 Replies
9. UNIX for Advanced & Expert Users
Hi,
The following sed command is not working for me, does anyone have a good alternative for joining lines in a file based on a match?
# if a line ends with a backslash, append the next line to it
sed -e :a -e '/\\$/N; s/\\\n//; ta' (6 Replies)
Discussion started by: greptastic
6 Replies
10. Shell Programming and Scripting
Hi,
I want a list of entries in 3 space delimited columns. I want to sort entries based on the very first column. Rows can't be changed. For example:
If I have...
Abc Abc Acc
Bca Bda Bdd
Cab Cab Cbc
Dbc Dca Dda
Abc Abc Acc
the output should be...
Abc Abc Acc
Abc Abc Acc
Bca... (7 Replies)
Discussion started by: MobileUser
7 Replies