10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have below in put to demo.txt
output should be... (4 Replies)
Discussion started by: oraclermanpt
2. Shell Programming and Scripting
This seems like it should be an easy problem, but for some reason I am struggling with the solution.
I simply want to replace all characters after the first 3 characters with another character, preferably with sed.
Thanks in advance.
Like this, but producing the proper number of *'s:
sed... (30 Replies)
Discussion started by: leolson
3. Shell Programming and Scripting
i need to replace the any special characters with escape characters like below.
!@#$%^&*()-= to be replaced by
\!\@\#\$\%\^\&\*\(\)\-\= (8 Replies)
Discussion started by: laknar
4. Shell Programming and Scripting
I have a line ending with special character and 0
The special character is the field separator for this line
in VI mode the file will look like below, but while cat the special character wont display
i know the hexa code for the special character ^_ is \x1f and ascii code is
... (0 Replies)
Discussion started by: ratheeshjulk
I want to replace the special characters in the file.
For eg: cat abc
I want to replace / and ` with the letter a and the output should like below. How to achieve this.
234afsafd (2 Replies)
Discussion started by: rogerben
6. Shell Programming and Scripting
I have a file which includes some French Characters and I want to change them to other characters like
└ to À
┬ to Â
╔ to É
and so on.
I am tyring to use tr command like
tr └┬╔ ÀÂÉ < input file
But it does not work. Only... (2 Replies)
Discussion started by: naveed
7. Shell Programming and Scripting
I've got a file (numbers.txt) filled with numbers and I want to replace each one of those numbers with a new random number between 0 and 9. This is my script so far:
rand=$(($RANDOM % 9))
sed -i s//$rand/g numbers.txtThe problem that I have is that it replaces each number with just... (2 Replies)
Discussion started by: hellocatfood
8. Shell Programming and Scripting
I have a file in which i want to replace the charaters from position 3-5 with a particular string for the first line.
The file contains
i want to replace the characters 3-5 for the first line as 678
so, the file should look like
... (7 Replies)
Discussion started by: dnat
9. Shell Programming and Scripting
I try to get tr to replace multibytes characters by ascii equivalent. For example
"Je vais Ó l'Úcole" ---> 'Je vais a l'ecole"
But my version of tr (5.97) doesn't seem to support multibyte sets.
$ locale charmap; echo "Je vais Ó l'Úcole" | tr ÚÓ ea
Je vais aa l'aacole
I try to... (2 Replies)
Discussion started by: ripat
10. UNIX for Dummies Questions & Answers
In a file, How do I replace a set number of characters in each line?
For example.... substitute the first 54 characters of each line with mv?
Lisa (8 Replies)
Discussion started by: lgardner17325