10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have two files which look like this
cat waitstate.txt
18.2
82.1
cat gostate.txt
5.6
5.8
6.1
6.3
6.6
6.9
7.2
7.5 (4 Replies)
Discussion started by: jamie_123
4 Replies
2. Shell Programming and Scripting
Hello,
I have a file with a date field with various lengths. For example:
m/d/yyyy hh:mm or h:mm
mm/dd/yyyy hh:mm or h:mm
Is there a way using sed or awk to change the field to m/d/y ? I don't need the hours and minutes in that field, just the date in the proper format.
Thanks in... (6 Replies)
Discussion started by: sonnyo916
6 Replies
3. Shell Programming and Scripting
Hi all,
I have a requirement to replace a field with a character as per the length of the field.
Suppose i have a file where second field is of 20 character length. I want to replace second field with 20 stars (*). like ********************
As the field is not a fixed one, i want to do the... (2 Replies)
Discussion started by: gani_85
2 Replies
4. Shell Programming and Scripting
Hi,
I am trying to figure out how to get the length of the longest column in the entire file (because the length varies from one row to the other)
I was doing this at first to check how many fields I have for the first row:
awk '{print NF; exit}' file
Now, I can do this:
awk '{ if... (4 Replies)
Discussion started by: MIA651
4 Replies
5. Shell Programming and Scripting
Hi,
I am new to Unix. Please help me in finding solution for the below scenario.
I have a flat file that contains data like
378633410|3013505414|new_378633410|ALBERT|WALLS|378633410|Rew|||||||
351049045|239|new_351049045|JIM|COOK|351049045|Rew|||||||... (6 Replies)
Discussion started by: anandek
6 Replies
6. 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
7. Shell Programming and Scripting
I have a sample txt file which has different variable lengths of 2,10,3,15.
What is the command that I need use in order to get the record count that has length '3'
Thanks (3 Replies)
Discussion started by: bobby1015
3 Replies
8. Shell Programming and Scripting
I have a field MPN-BANK-NUMBERO:006,00:N in a file FILE1
How can i display the length of the Bank Number.Any idea ?
The output shud take the following format
FILE 1 6
Where 1 is the starting position and 6 is the Ending position. (9 Replies)
Discussion started by: bobby1015
9 Replies
9. UNIX for Dummies Questions & Answers
What's wrong with this part of my script?
I just want to put each column from a fixed length file into a variable so I can validate each field later in the script.
exec< myfile.dat
while read afile; do
a=`echo $(echo $afile |cut -c1-10)`
echo "$a"
b=`echo $(echo $afile |cut -c11-20)`... (12 Replies)
Discussion started by: giannicello
12 Replies
10. Shell Programming and Scripting
:confused: Does anyone know which command I can use to find out the length of a string held within a variable? (5 Replies)
Discussion started by: dbrundrett
5 Replies