10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
I have a string and want to replace the / with a space.
For example having "SP/FS/RP" I want to get "SP FS RP"
However I am having problems using gsub
set phases = `echo $Aphases | awk '{gsub(///," ")}; {print}'` (5 Replies)
Discussion started by: kristinu
5 Replies
3. Shell Programming and Scripting
I'm trying to replace a string "99999999'" with the blank where ever is there in the file. Could you please help in unix scripting.
Thank You. (6 Replies)
Discussion started by: vsairam
6 Replies
4. UNIX for Advanced & Expert Users
I would like to replace the value of * (which might have one or more whitespace(s) before and after *) using sed command in aix.
Eg: Var='Hi I am there *
Desired output: Hi I am there* (1 Reply)
Discussion started by: techmoris
1 Replies
5. Shell Programming and Scripting
I am poor with scripting;)
I have a file in the following format;
'This is a "test in production" of importance.'
I want to get rid of the spaces inside the "" part only to get the output as,
'This is a "testinproduction" of importance.' (1 Reply)
Discussion started by: shmathew
1 Replies
6. UNIX for Dummies Questions & Answers
Hello All,
I have a file with thousands of records:
eg:
|000222|123456987|||||||AARONSON| JOHN P|||PRIMARY |P
|000111|567894521|||||||ATHENS| WILLIAM k|||AAAA|L
Expected:
|000222|123456987|||||||AARONSON| JOHN |P|||PRIMARY |P
|000111|567894521|||||||ATHENS| WILLIAM |k|||AAAA|L
I... (6 Replies)
Discussion started by: OSD
6 Replies
7. Shell Programming and Scripting
Hi,
Actually I am want to cut the three fields of "file-nr" file.
$ cat /proc/sys/fs/file-nr
638 219 52270
I want to assign these value to diffrent varibales as follow:-
a=638
b=219
c=52270
I tried to use cut command for this purpose and also tried to squeeze all sapces... (6 Replies)
Discussion started by: bisla.yogender
6 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a file with a URL text written in it within double quotes e.g.
"http://abcd.xyz.com/mno/somefile.dtd"
I want the above text to get replaced by a single space character.
I tried
cat File1.txt | sed -e 's/("http)*(dtd")/ /g' > File2.txt
But it didnt work out. Can someone... (5 Replies)
Discussion started by: dsrookie
5 Replies
9. Shell Programming and Scripting
I want to write a script which will check the arguments and if there is a single space(if 2 more more space in a row , then do not touch), replace it with _ and then gather the argument
so, program will be ran
./programname hi hello hi usa now hello hello
so, inside of program,... (7 Replies)
Discussion started by: convenientstore
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