10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I have records in unix file like below. In this file, we have empty fields from 4th Column to 22nd Column. I have some 200000 records in a file. I want to extract records only which have empty fields from 4th field to 22nd filed. This file is comma separated file. what is the unix... (2 Replies)
Discussion started by: rakeshp
2 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
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
4. 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
5. Shell Programming and Scripting
I have 2 files A.txt and B.txt
A.txt 3 fields and separate by a comma
some,thing,florida
any1,thing1,california
some2,thing2,dallas
just,fun,kansas
B.txt has 8 fields and separate by a comma
what,ever,florida-state,,,,,,
some,one,dallas_state,,,,,,
You will see 3rd fields are the... (5 Replies)
Discussion started by: sabercats
5 Replies
6. Shell Programming and Scripting
I need to use a shell script, using sed command how to replace date variable value in following format.
04/18/2012 11:38:55
Because the sed is treating the '/' as a parameter instead of the value of a variable, and hence there is the message as
sed: command garbled: s/insert/04/18/2012... (9 Replies)
Discussion started by: jannusuresh
9 Replies
7. 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
8. Shell Programming and Scripting
hello forum memvers,
1:I have to write a script for find a string and replace with another string.
2:In shell script how to replace one string with another string.:b: (4 Replies)
Discussion started by: rajkumar_g
4 Replies
9. Shell Programming and Scripting
I have a data file having first 19 characters having the date in the below format-
2010-04-29-00.00.00
I have to check this date field ( first 19 characters) against some specific dates and if date is not in 3 valid dates ( business date available to me , business date - 1 , businessdate... (10 Replies)
Discussion started by: varunrbs
10 Replies
10. Shell Programming and Scripting
Hello,
I need some help ....i have a file with many number of fields i want to replace the 10th field of the file by number 2 .Also the delimeter of the file is | .
Pls suggest and help..
Regards, (2 Replies)
Discussion started by: PradeepRed
2 Replies