Need to display the output of ls -l selected columns
Hello Friends,
Hope you are doing well.
I am writing a shell script to find out the log file which are not updated in last 1 hours. I've almost completed the script but need your help in formatting its outputs.
Currently, the output of the script is like this(as a flat row):
-rw-rw-r-- 1 tibco tibco Jun 18 10:01 /opt/tibco/tra/domain/ICCIR2Test11/logs/ApplicationManagement.log
In this the domain name is ICCIR2Test11, log file would be *.log and time would be its modification time as usual.
I need to convert the output as below:
Domain Name Log File Time last updated
ICCIR2Test11 ApplicationManagement.log Jun 18 10:01
I tried the below codes just for a test,
and the output is
ICCIR2Test11
Jun 18 10:01
Can you please let me know if it is possible to convert it into the format described above?
I have to ascend the number of two selected columns by horizontal manner.
For example, I have a data like this in csv file (tab delimited format)
08 1 19185 18010
16 4 7960 9339
01 6 516769 517428
09 9 51384 49270
I need to ascend the two columns numbers (horizontal manner) like as... (5 Replies)
Can I transform input like the below ?
Note: Insert zeros if there is no value to transform.
Input
key name score
key1 abc 10
key2 abc 20
key1 xxx 100
key2 xxx 20
key1 zzz 0
key2 zzz 29
key3 zzz 129
key1 yyy 39output
abc ... (1 Reply)
Hey guys
I have got a tab-separated file and I want to copy only selected records from two columns at a time satisfying specified condition, and create a new file.
My tab separated file is like this
ID score ID score ID Score ID score ID score
1_11 0.80 2_23 0.74 2.36 0.78 2_34 0.75
A_34... (9 Replies)
I have several files with say something like
cat
sparrow
I can grep for "cat" and "sparrow" and usually the output is one below the other
cat
sparrow
How can I view these as columns say
Pets Birds
cat sparrow
Would be great if this can be on command line using awk or... (1 Reply)
Hi All,
I've got a file like this:
a 1 0 0 0 1 0 0 1 1 3 3 1 4 4 4
b 1 0 0 0 1 4 4 1 3 1 1 4 4 2 2
c 1 0 0 0 2 0 0 3 3 1 3 1 1 2 4
d 1 0 0 0 2 0 0 1 1 0 0 4 4 2 4
The file has ~4200 entries. I need to exclude those columns that are zeros for all those rows that have 2 in column 6. For... (0 Replies)
Hello all
I have a question on displaying log
When i am redirecting the output to a log, it displays but in a format which i am not happy about. Can i give any explicit commands which says to display the above log at specific row and column
I want to do this for each line of the log
What is... (2 Replies)