awk works by default with either tab or space delimiter
So, if your input file was slightly different, you might not get your desired results with a 'plain' awk. See below where there is a single space between the month and a number:
Hi,
This is my input file:
ali 5 usa abc
abu 4 uk bca
alan 6 brazil bac
pinky 10 utah sdc
My desired output:
pinky 10 utah sdc
alan 6 brazil bac
ali 5 usa abc
abu 4 uk bca
Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Can anyone please help with this? I have 2 files as given below.
If 2nd column of file1 has pattern foo1@a, find the matching 1st column in file2 & replace 2nd column of file1 with file2's value.
file1
abc_1 foo1@a ....
abc_1 soo2@a ...
def_2 soo2@a ....
def_2 foo1@a ........ (7 Replies)
Hi,
I have two input files as
File1 :
ABC:client1:project1
XYZ:client2-aa:project2
DEF:client4:proj
File2 :
client1:W-170:xx
client2-aa:WT-04:yy
client4:L-005A:zz
Also, array of valid values can be hardcoded like
Output :
ABC:W:project1
XYZ:WT:project2 (1 Reply)
My TSV looks like:
Hello my name is John \t Hello world \t Have a good day! \t See you later!
Is there a simple bash script that splits the tsv on tab to:
Hello my name is John
Hello world
Have a good day!
See you later!
I'm really stuck, would appreciate any help! (5 Replies)
Dear fellows, I need your help.
I'm trying to write a script to convert a single column into multiple rows.
But it need to recognize the beginning of the string and set it to its specific Column number.
Each Line (loop) begins with digit (RANGE).
At this moment it's kind of working, but it... (6 Replies)
Hi all,
I have a quick question:
I have a 4 column tab-separated file.
I want to count the number of times each unique value in column 2 appears and add that number in a 5th column.
I have the following input file:
waterline-n below-sheath-v 14.8097 A
dock-n below-sheath-v ... (4 Replies)
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies
LEARN ABOUT PHP
jdmonthname
JDMONTHNAME(3) 1 JDMONTHNAME(3)jdmonthname - Returns a month nameSYNOPSIS
string jdmonthname (int $julianday, int $mode)
DESCRIPTION
Returns a string containing a month name. $mode tells this function which calendar to convert the Julian Day Count to, and what type of
month names are to be returned.
Calendar modes
+-----+--------------------------------------+---+
|Mode | | |
| | | |
| | Meaning | |
| | | |
| | Values | |
| | | |
+-----+--------------------------------------+---+
| 0 | | |
| | | |
| | Gregorian - abbreviated | |
| | | |
| | Jan, Feb, Mar, Apr, May, Jun, Jul, | |
| | Aug, Sep, Oct, Nov, Dec | |
| | | |
| 1 | | |
| | | |
| | Gregorian | |
| | | |
| | January, February, March, April, | |
| | May, June, July, August, September, | |
| | October, November, December | |
| | | |
| 2 | | |
| | | |
| | Julian - abbreviated | |
| | | |
| | Jan, Feb, Mar, Apr, May, Jun, Jul, | |
| | Aug, Sep, Oct, Nov, Dec | |
| | | |
| 3 | | |
| | | |
| | Julian | |
| | | |
| | January, February, March, April, | |
| | May, June, July, August, September, | |
| | October, November, December | |
| | | |
| 4 | | |
| | | |
| | Jewish | |
| | | |
| | Tishri, Heshvan, Kislev, Tevet, She- | |
| | vat, AdarI, AdarII, Nisan, Iyyar, | |
| | Sivan, Tammuz, Av, Elul | |
| | | |
| 5 | | |
| | | |
| | French Republican | |
| | | |
| | Vendemiaire, Brumaire, Frimaire, | |
| | Nivose, Pluviose, Ventose, Germinal, | |
| | Floreal, Prairial, Messidor, Thermi- | |
| | dor, Fructidor, Extra | |
| | | |
+-----+--------------------------------------+---+
PARAMETERS
o $jday
- The Julian Day to operate on
o $calendar
- The calendar to take the month name from
RETURN VALUES
The month name for the given Julian Day and $calendar.
PHP Documentation Group JDMONTHNAME(3)