Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
cancel the enter key in a text
Name: edmondo Date: March 13, 2006 at 03:12:04 Pacific OS: xp 2003 CPU/Ram: centrino Product: sony
Comment:
I am looking for the sed command to cancel all the enter keys in a corpus. I have eliminated the tab key with sed -e 's/\t//g' but I don't know how to do it with the enter key. Thank you
Name: FishMonger Date: March 13, 2006 at 09:50:31 Pacific
Reply:
Do you really want to remove all line endings which will put everything on 1 line?
s/\n//g
0
Response Number 2
Name: edmondo Date: March 16, 2006 at 05:24:37 Pacific
Reply:
Thank you Fishmonger. Yes I need to lemmatize a corpus and I need to remove all line endings. The enter key seems to disturb the lemmatizing process. I've tried the sed -e 's/\n//g' but I still see the file unchanged. The command does not work...
Edmondo
0
Response Number 3
Name: nails Date: March 21, 2006 at 20:59:02 Pacific
Reply:
This solution doesn't use sed, but seems to work. echo'ing a variable to xargs emulates what you want:
#!/bin/ksh
myvar=$(cat <<MSG line 1 line 2 line 3 MSG)
# myvar with LFs echo "$myvar" echo echo
# myvar without LFs echo "$myvar"|xargs
0
Response Number 4
Name: FishMonger Date: March 23, 2006 at 08:06:24 Pacific
Summary: Hello All, Can you help me in capturing the enter key in the script? For eg : echo "Press Enter to continue :" -> after this the script should wait until the user presses enter and then will continue ...
Summary: Hi, I am a unix newbie. I am trying the following to search for a number of words in a text file (@unix command prompt), but the entire file contents are displayed. Can anyone tell me where I am makin...
Summary: hi i would like to insert a delimiter in a text at specified location. for example : initial text : thisisanexample desired output: this|is|an|example could any one help me ... thanx ...