10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All,
I have a file as below . I want to convert the Y with numbers to H
From
4,
M11,
P2521759,
Y75,Y70,Y105,Y110,Y700,Y815,Y830,Y900,Y162,Y300,
Y291,Y290,Y15,Y20,
MR2716014,MR2617014,
Yesterday,current
1,201012,
102032,1
11112,0
to
4,
M11,
P2521759,... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
2. UNIX for Dummies Questions & Answers
Hi
I've a string . And i need to replace set of characters with a single character
Means .. or . or ... and so on should be replaced with single % character
Irrespective of number of dots in between the characters , those should be replaced with single %
All the above strings should be... (3 Replies)
Discussion started by: smile689
3 Replies
3. Shell Programming and Scripting
Hi experts,
Need your help on how to insert carriage return after the 10th char position of each line in a file and then add two blank spaces after the carriage return.
Example:
>cat test.txt
testingline
dummystring
samplesample
teststringline
Expected output should be..
... (2 Replies)
Discussion started by: brichigo
2 Replies
4. UNIX for Dummies Questions & Answers
Hi
I'm trying to remove what I "think" is a bad character. How I got the bad character is when I downloaded jpgs onto my PC and then renamed the files using windows explorer. In cygwin, the files look like
$ dir -l
total 7840
----------+ 1 None 3647968 Jul 21 08:41 2012-07-21\ (1).JPG... (6 Replies)
Discussion started by: SailingDreams
6 Replies
5. Shell Programming and Scripting
hi,
i have a file with delimiter "þ" . how to read these delimiters filters like AWK and cut..:wall:
Thanks,
Soma (1 Reply)
Discussion started by: challamsomu
1 Replies
6. Shell Programming and Scripting
I need to list all files where 1rst column=ABK and char position 123 to 125=ZBK:
For the first part I can I can do a awk '{$1="ABK";print}' file and for the second a cut -c123-125 file | grep ZBK but this would only work partially..
How can I do this with only one awk command ?
Thanks in... (10 Replies)
Discussion started by: cabrao
10 Replies
7. Shell Programming and Scripting
Hi all,
I am trying to find the best way of making a change to 1 char in a string, the string can be between 1 and 14 characters.
I am reading a line in from a file which contains
012341231231:2:102939283:NNN: Require :NBN:
012838238232:3:372932:NNN: Require :NNB:
I need to change 1 N or a... (8 Replies)
Discussion started by: nkwilliams
8 Replies
8. Shell Programming and Scripting
Hi
I'm trying to use awk in a file(test123.dat).
My requirement is to to check for the 65th position, if the 65th position is a space then replace the 65th position by the number 9.
This is the code that i used:
awk '{substr($0,65,1) ~ / / }{sub(substr($0,65,1),"9")}{print}' test123.dat
... (7 Replies)
Discussion started by: angelarosh
7 Replies
9. Programming
how we can replace char with a string
example
char *a="a.s"
so finally
what i ant to do
raplace a with ant and s sree
so in my array a i want to store the value as "ant.sree"
thank u in advance (1 Reply)
Discussion started by: phani_sree
1 Replies
10. UNIX for Dummies Questions & Answers
I have a file where some records have been updated the wrong way and need to fix it quickly since the amount can be alot.
Every record where any of the first 4 characters are in upper case need to be changed to lowercase.
Records can have '#' in position-1 for comments. These musn't be... (2 Replies)
Discussion started by: Browser_ice
2 Replies