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.
I have a file contains 100 section (here i show 2 section of that); i want to replace date from 1st & 2nd field of 1st line of each section (1st line of each section is header and the other lines are body) and merg them into one field, then copy it on 7th field of the lines in each section separately ( make a new field with date value ).
i have 3 files as below:
Code:
[test1][test2][test3]
i want to print 1st,2nd,5th and 10th filed of 1st to 5th lines from each files into a line of an output file, so the result would be:
[output]:
Code:
{line1}(field 1 of line 1 from file 1)(field 2 of line 1 from file 1)(field 5 of line 1 from file 1)(field 10 of line 1 from file 1)...(field 10 of line 5 from file 1)
{line2}(field 1
man 5 shadow gives the following description of the third field in each line:
The date of the last password change, expressed as the number of days since Jan 1, 1970.
The value 0 has a special meaning, which is that the user should change her pasword the next time she will log in the system.
An empty field means that password aging features are disabled.
Does this refer to times in
If i have a log file record.txt, with 10 fields
- First field is datetime
- 7th field is status
- 8th filed is name
- The last field (10th) is epoch time of the first field
Code:
02/17/2012 1:47 PM||||||In Use|chicken||1329515230
02/17/2012 2:53 PM||||||Available|chicken||1329519195
02/17/2012 3:20 PM||||||In Use|cat||1329520802
02/17/2012 3:22 PM||||||In Use|cat||1329520957
02/17/20
Hi,
How to get correct field/column from autosys autorep command.
i have a log file that has the date and time that looks like this:
Code:
Wed Jun 28 15:46:21 2012 test failed tailed passed passed not error panic
what we want to focus on is the first 5 columns because they contain the date and time.
the date and time can be anywhere on the line. in this particular case, the date and time is at the beginning of the line.
Hi,
Is there any short method to print from a particular field till another filed using awk?
Example File:
Code:
File1
====
1|2|acv|vbc|......|100|342
2|3|afg|nhj|.......|100|346
Expected output:
[code]
File2
====
acv|vbc|.....|100
afg|nhj|.....|100
[code]
In the above example, let say I have 101 fields, I have print line only from 3 field to 100 field.
Is
Code:
awk '{print $3FS
Hi,
I have a xml file (Config.xml) with following entry
<Date="" Node1="50" Groups="20">
Now I want to use sed to insert/update the Date field with the latest date say - 20120711.