10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All.
Attached are two files.
I ran a query and have the output as in the file with name "FILEWITHFOURRECORDS.txt "
I didn't want all the spaces between the columns so I squeezed the spaces with the "tr" command and also added a carriage return at the end of every line.
But in two... (3 Replies)
Discussion started by: sparks
3 Replies
2. Shell Programming and Scripting
Greetings all
I have a delimited text file (the delimiter is ';') where certain fields consist of many blanks e.g. ; ; and ; ;
Before I separate the data I need to eliminate these blanks altogether.
I tried the sed command using the following syntax:
sed -i 's/; *;/;;/g' <filename>
... (15 Replies)
Discussion started by: S. BASU
15 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,
I am trying to use sed to replace a file path within all the .lay (.txt) files in a folder. I feel that this should be easy but I can't get it to work no matter what i try.
I'm using cygwin.
For a .txt file containing the below line I want to replace this file path with a new one.
... (1 Reply)
Discussion started by: carlr
1 Replies
5. Shell Programming and Scripting
Hi, all,
I'm from the 8-bit micro days (Z-80, 6809, 6502, etc.) and used to program in assembly and machine code. But, that was 25 years ago and life happened. Now, I'm scripting for the hackintosh community and love every bit of it.
I'm parsing a DSDT compiler log for error/warning/remarks... (0 Replies)
Discussion started by: digital_dreamer
0 Replies
6. Shell Programming and Scripting
I need some help deleting lines in a file that contain spaces. Im sure awk or sed will work but i dont know much about those commands. Any help is appreciated :D (7 Replies)
Discussion started by: r04dw4rri0r
7 Replies
7. Shell Programming and Scripting
Hi all,
I have a file with little blocks beginning with a number 761XXXXXX, and 0, 1, 2 or 3 lines below of it beginning with STUS as follow:
761625820
STUS ACTIVE 16778294
STUS NOT ACTIVE
761157389
STUS ACTIVE 16778294
761554921
STUS ACTIVE 16778294
STUS NOT ACTIVE
STUS ACTIVE OP... (4 Replies)
Discussion started by: cgkmal
4 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 All.
I need help for the below logic.
I ve a file like following
input file:
NopTX(5) // should be remain same as input
----Nop(@100); //1
Nop(90); //2
--Nop(80); //3
@Nop(70); //4
--@Nop(60); //5
@Nop@(@50); //6
--Nop@( 40); ... (3 Replies)
Discussion started by: user_prady
3 Replies