10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Could you please advise what is the best way to edit a file without disrupting the spaces?
For example: I have within my file the value below, wherein I wanted to change VALUE2 to VALUETEST.
The total characters on the field of VALUE2 is 15 characters.
VALUE1|VALUE2<9 spaces>|VALUE3
but... (3 Replies)
Discussion started by: asdfghjkl
3 Replies
2. Shell Programming and Scripting
Hello,
I have a file with hundreds of lines. Now I need to replace positions 750-766 in each line (whatever there is there) with spaces... how can I do that?
Which command to use?
The result will be all the lines in the file will have spaces in positions 750-766.
Thanks! (3 Replies)
Discussion started by: netrom
3 Replies
3. UNIX for Dummies Questions & Answers
I am looking for a regular expression that uses sed to replace multiple spaces with single spaces on every line where it is not at the start of the line and not immediately before double slashes ('//') or between quotes (").
In its simplest form, it would look like this:
sed -e 's# # #g'... (4 Replies)
Discussion started by: figaro
4 Replies
4. Shell Programming and Scripting
Hi;
In following code
find LOG_DIR -type f | while read filename; do echo $filename; done
I want to precede each white space encountered in filename with \ so that when i use $filename for running some commands in do...done,it wont give me an error.
will appreciate ur help in this.... (1 Reply)
Discussion started by: ajaypadvi
1 Replies
5. Shell Programming and Scripting
I want my program to replace tabs with spaces.1tab=4spaces.When i write aa(tab)aaa(tab)(tab)a(tab) it must show me aaxxaaaxxxxxaxxx. I think that my program works corectly but when a write aaa(tab)a it must show aaaxa but it is aaaxxxxxa.Please for help!!! That is my code:
#include <stdio.h>
... (3 Replies)
Discussion started by: marto1914
3 Replies
6. Shell Programming and Scripting
Hi Experts,
We are facing some while loading the "csv" file to target table.Some of the records are having values as :
Account number,Name,Address
"123","XYZ","302 Street,Washington,US"
"456","PQR"," 3233 Some Street,
Washington,US"
In the above file instead reading only two records it... (11 Replies)
Discussion started by: Amey Joshi
11 Replies
7. Shell Programming and Scripting
Hi,
I have a file origFile.txt with values:
origFile.txt
.00~ 145416.02~ xyz~ ram kishor ~? ~ ~783.9
.35~ 765.76~ anh reid~ kelly woodburg ~nancy ~ ~?
Now each row in the file has value for 7 columns with "~" as delimiter.
The requirement was
i)I need to erase the blank spaces between... (2 Replies)
Discussion started by: badrimohanty
2 Replies
8. Shell Programming and Scripting
hi
i have records in my input file like this
aaa|1234||2bc||rahul|tamilnadu
bba|2234||b4c||bajaj|tamilnadu
what i am expecting is in between two pipes if there is no character it should be replaced with null or 0
so my file will look like this
aaa|1234|null|2bc|0|rahul|tamilnadu... (4 Replies)
Discussion started by: trichyselva
4 Replies
9. Shell Programming and Scripting
hi all
this is the part i am facing a problem
eg data: filename : tr1
+ T 40
this is a sample record in that file ... the value of T can be anything, but will be a single character.
i need to cut from field two, and i am using this command
cut -d " " -f2 tr1 >tr3
and the o/p is ... (7 Replies)
Discussion started by: sais
7 Replies
10. Shell Programming and Scripting
hi,
I have some 50 C files in which for indentation of code some devlopers used tabs, but we dont want any tab used for indentation.
I have following 2 need.
1) find tabs from all 50 files (which are in one directory )
2) replace them with 4 spaces.
Thanks
Rishi (6 Replies)
Discussion started by: rishir
6 Replies