10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have a big text file with similar data as below and need the text as in output
using awk or sed. any help is greatly appreciated.
Input:
City=Chicago Elden street
>>> reservedBy = business 1
>>> reservedBy = business 2
>>> reservedBy = business 3
City=Dallas Elm street
>>>... (5 Replies)
Discussion started by: tech_frk
5 Replies
2. Shell Programming and Scripting
Hi all,
Saying we have two files:
1. A "Reference File" whose content is "Variable Name": "Variable Value"
2. A "Model File" whose content is a model program in which I want to substitute "VariableName" with their respective value to produce a third file "Program File" which would be a... (4 Replies)
Discussion started by: dae
4 Replies
3. Shell Programming and Scripting
Hi guys,
I worked for almost a half-day for the replacement of some text automatically with script. But no success.
The problem is I have hundred of files, which need to be replaced with some new text. It's a painful work to work manually and it's so easy to do it wrong.
For example,
I... (2 Replies)
Discussion started by: liuzhencc
2 Replies
4. Shell Programming and Scripting
Hello,
I have many CSV files with variable number of rows and columns.
Sample of few problematic CSV files.
,,Price,Price,Price,Price,Price,Price,Price,Price,Price,Qty
Date,Sl,AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,PriQueue,%busy
30/07/2014,1,AAA,BBB,CCC,DDD,EEE,FFF,GGG,HHH,NA,0... (8 Replies)
Discussion started by: reddyr
8 Replies
5. Shell Programming and Scripting
Hello scriping expert friends,
I have 2 requirements on replacing fields of text files:
I have lot of data with contents like below:
Requirement-1:
The digit after 0 should always be changed to 1 (3 Replies)
Discussion started by: magnus29
3 Replies
6. Shell Programming and Scripting
Hi. I'd appreciate if I can get some direction in this issue to get me going.
Datafile1:
-About 4000 records, I have to update field#4 in selected records based on a match in the key field (Field#1).
-Field #1 is the key field (servername) . # of Fields may vary
# comment
server1 bbb ccc... (2 Replies)
Discussion started by: RascalHoudi
2 Replies
7. Shell Programming and Scripting
Hello,
I'm new to this forum but this seems like the place to ask this question.
I have a pipe delimited data file with the fields except for the header being encased in double quotes. I found out that some of the fields have an trash pipe within the data itself. I'd like to conditionally... (4 Replies)
Discussion started by: samahs
4 Replies
8. Shell Programming and Scripting
Hi all,
I need a bash, sed, awk script or one liner to do the following task:
This is the format of a text file:
2010-06-11 20:01 902656 HOP-W-100412-1.doc
2010-11-05 18:01 364447 NEX-W-101104-1
2010-07-06 10:01 64512 Cerintele
2010-07-06 10:01 599420 content
2010-07-19 14:01 1785344... (7 Replies)
Discussion started by: supervazi
7 Replies
9. Shell Programming and Scripting
Hi ,
I need some help on perl/sed conditional replacement
The situation is like below .
I have a file contents like below .
AAA|BBB|CCC|DDD
AAA|BCF|CCC|HHH
AAA|BVF|JJJ|KKK
Here in the above file . I know my second column value (taking "|" as my delimited )
Basically I have to... (3 Replies)
Discussion started by: robin.r888
3 Replies
10. UNIX for Dummies Questions & Answers
Hi group,
I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file???
The solution should be a one liner using awk and sed.
Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies