10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Each record coming with column names. I have to replace them in each record as shown below
TIME=20181219110000261|CHAN=FMBKHJBAAAADPCFNAAAAAABA|EVNT=SWIclst|VALU=Session FMBKHJBAAAADPCFNAAAAAABA started|SRC=NSS|UCPU=0|SCPU=0
Output should look like: ... (9 Replies)
Discussion started by: sudhakar1987
9 Replies
2. Shell Programming and Scripting
Hi,
Need to replace last field in a file(/etc/passwd) ,if first filed matches with particular username.
Scenario:
cat testfor1
deekshi:x:7082:7082::/home/deekshi:/bin/bash
harini1:x:7083:7083::/home/harini1:/bin/bash
Here,if first field contains "deekshi", then i should replace... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
3. Shell Programming and Scripting
hai guys,
pick the 1st field and calculate max length.
if suppose max length is 2,
then compare the all records if <2 then add zero's prefix of the record.
for ex:
s.no,sname
1,djud
37,jtuhe
in this max length of the 1st field is 2 right
the output wil be
s.no,sname
01,djud... (6 Replies)
Discussion started by: Suneelbabu.etl
6 Replies
4. 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
5. Shell Programming and Scripting
i have something like this,
cat filename.txt
hui this si s"dfgdfg" omeone ipaddress="10.19.123.104" wel hope this works
i want to replace only 10.19.123.104 with different ip say 10.19.123.103
i tried this
sed -i "s/'ipaddress'/'ipaddress=10.19.123.103'/g" filename.txt
... (1 Reply)
Discussion started by: vivek d r
1 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 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
8. Shell Programming and Scripting
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies
9. Shell Programming and Scripting
I have a pipe delimited file. I need to check that the first and second fields are 5 characters long and if not i need to append 0 in front of them to make them 5 characters long. can some body let mwe know how i can find the length of the two fields and then make them 5 characters long if they... (6 Replies)
Discussion started by: dsravan
6 Replies
10. 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