10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Can someone please share a Simple AWK command to append Carriage Return & Line Feed to the end of the file, If the Carriage Return & Line Feed does not exist !
Thanks (16 Replies)
Discussion started by: rosebud123
2. Shell Programming and Scripting
I'm looking for some help in renaming data-timestamps stored within different calendar directories/files.
The calendar directory has hundreds of ICS files:
~/Library/Calendars/F494C908.calendar/Events/DE7867E61969.ics... (8 Replies)
Discussion started by: Schubi
3. Shell Programming and Scripting
Hi! I have been struggling with a large file that has stray end of line characters.
I am working on a Mac (Lion). I mention this only because I have been mucking around with fixing my problem using sed, and I have learned far more than I wanted to know about Unix and Mac eol characters.
I... (1 Reply)
Discussion started by: user999991
4. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
5. Shell Programming and Scripting
using VI, can anyone tell me how to add some characters onto the end of a line where the line begins with certain charactars eg
all lines in the above example starting with a,b,c, I want to add an x at the end of the line so the... (6 Replies)
Discussion started by: satnamx
6. UNIX for Dummies Questions & Answers
Coding in unix shell script.
Thanks (6 Replies)
Discussion started by: sam12345
7. UNIX for Dummies Questions & Answers
How to add control characters at the end of each line in a file?
Can anyone help me with this?
Shobana (2 Replies)
Discussion started by: Shobana_s
8. Shell Programming and Scripting
I have a xml file and requirement is to remove the line feed and add line feed after some element.
<?xml version="1.0" ?>
... (8 Replies)
Discussion started by: sreejitnair123
9. Shell Programming and Scripting
I have a file with lots of line feeds and form feeds (page break). Need to replace last occurrence of form feed (created by - echo "\f" ) in the file with line feed.
Please advise how can i achieve this.
Prvn (5 Replies)
Discussion started by: prvnrk
10. UNIX for Advanced & Expert Users
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Discussion started by: rudoraj