10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Community;
I need to join two files but I am facing issues.
1st file has multiple columns. Primary (1st) columns has unique values. There are other columns out of which some has non-ascii characters as well (other language).
Example File below:
1-1001JRL,BiRecurring... (5 Replies)
Discussion started by: mystition
5 Replies
2. Shell Programming and Scripting
I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)
Discussion started by: cmccabe
10 Replies
3. Shell Programming and Scripting
Dear all:
I have a file:
1:00 2:abc 3:12asweand I ran the following awk script on this file:
#!/usr/bin/awk -f
{ i= 1;
while(i<=NF) {
$i=substr($i, 1, index($i, ":")-1);
i++
}
}I am expecting the file would become (after running... (7 Replies)
Discussion started by: littlewenwen
7 Replies
4. Shell Programming and Scripting
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... (17 Replies)
Discussion started by: oreka18
17 Replies
5. Shell Programming and Scripting
Hello Everyone,
I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table.
Input Data-
------ ------------------------ ---- -----------------
WFI001 Xxxxxx Control Work Item A Number of Records
------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies
6. UNIX for Dummies Questions & Answers
I have a csv flatfile with a few million rows. I need to replace a field (field number is 85) in the file with a sequential number.
As an example, let's assume there are only 4 fields in the file:
A,A,,32
A,A,,27
A,B,,43
C,C,,354
If I wanted to amend the 3rd field in this way my... (2 Replies)
Discussion started by: BristolSmithy
2 Replies
7. Shell Programming and Scripting
Hi,
Let say I have a file which has around 400 fields.
SampleFile
=========
PATIENTID|FACILITY|................|TIME_LAST_VISITED_BY_MD|.....|STATUS|
How is it possible to find out which field is TIME_LAST_VISITED_BY_MD?fro example by seeing the above structure we can saw FACILITY... (5 Replies)
Discussion started by: machomaddy
5 Replies
8. Shell Programming and Scripting
Hi all,
I did not use UNIX for a long time, now i need to make a flat file with extra field, can you help me with the code ?
1. I create a last line of each log from each system and make it in a flat text file (seperate by a pipe |)
mv current.log old
tail -1 sanfrancisco.log > current.log... (5 Replies)
Discussion started by: britney
5 Replies
9. Shell Programming and Scripting
Hi i have a txt file in which i do a awk operation with ":" as field separator
A
B
C
D
ABC::2386.13:2386.13:3248234281995::+DPY:INT:3:N::::2:200.00:0.00:2010-05-12:CA:
::2:N::N:PH:00010031:0001+DPY:BAL:3:N::::3:1601.01:0.00:2010-05-12:XT::2:N:MR ... (1 Reply)
Discussion started by: mad_man12
1 Replies
10. Shell Programming and Scripting
Hey Everyone!
I have searched around for this on Unix.com and Google, and I'm either not phrasing my search properly or this is not as simple as I thought...
I have a script that runs on a nightly basis that pulls one field worth of data from an internal MySQL database and populates to an... (2 Replies)
Discussion started by: Gecko12332
2 Replies