10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Everyone..
I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files
FileP.txt
... (2 Replies)
Discussion started by: YogeshG
2 Replies
2. Shell Programming and Scripting
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
3. Shell Programming and Scripting
Hi all,
i have a .csv file with only two columns, like:
Login;Status
Luca;S
Marco;
Stefano;
Elettra;S
Laura;
...
I need to replace the blank space on Status column whit Enabled end, on the same column, S whit Disabled, like:
Login;Status
Luca;Disabled
Marco;Enabled
Stefano;Enabled... (10 Replies)
Discussion started by: kamose
10 Replies
4. UNIX for Dummies Questions & Answers
I have a file like this.
It is tab delimited.
Unfortunately, the missing data was filled in with a period "." (see the leading lines 1-5 columns)
I want to substitute the periods for misisng data with an integer "-999".
however, I do not want the global replace to change the other periods seen... (7 Replies)
Discussion started by: genehunter
7 Replies
5. Shell Programming and Scripting
Hello,
I have some tab delimited files that may contain blank columns. I would like to delete the blank columns if they exist. There is no clear pattern for when a blank occurs.
I was thinking of using sed to replace instances of double tab with blank,
sed 's/\t\t//g'
All of the examples... (2 Replies)
Discussion started by: LMHmedchem
2 Replies
6. Shell Programming and Scripting
Hi,
I have a tab separated. I want to replace all the "&" in 8th column of the file with "and" .I am trying with
awk -F, -vOFS=\\t '{$8=($8=="&")?"and":$8}1' test> test1.txt
My file is abc def ghk hjk lkm hgb jkluy acvf & bhj hihuhu fgg
me mine he her go went has has & had hgf hgy
... (1 Reply)
Discussion started by: jagdishrout
1 Replies
7. Shell Programming and Scripting
hi,
I have a doubt in replacing characters with blank.
My requirement is that, i have one file and looks like below
4:ALTER SYSTEM DISCONNECT SESSION '193,191' IMMEDIATE;
6:ALTER SYSTEM DISCONNECT SESSION '205,7274' IMMEDIATE;
5:ALTER SYSTEM DISCONNECT SESSION '206,34158' IMMEDIATE;... (4 Replies)
Discussion started by: sridhusha
4 Replies
8. Shell Programming and Scripting
Hi all,
Been trying to find a solution to this, I'm sure its a sed 1 liner, but I don't know sed well enough to work it out...
I have a text file in the following format:
431 666 1332 2665 0.24395
432 670 ... (3 Replies)
Discussion started by: mpcengineering
3 Replies
9. Shell Programming and Scripting
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
3 Replies
10. Shell Programming and Scripting
Folks, I am wondering if anyone solve this problem.
What I want to know is,
1. Delete all white spaces including leading blank space in each line (e.g. line 2), and replace such spaces by single tab except leading blank space
2. Then, align all columns to the right. But, output white space... (1 Reply)
Discussion started by: Jae
1 Replies