10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to do some substitutions using the substitution operator (:%s) in a text file.
I want to replace all A1, A2, A3.......A100 in my text file.
I used :%s/A2/SAE/g successfully until A9 but when I use A1, all the A11 to A19 is changed. How do I specify the exact match here? (8 Replies)
Discussion started by: Kanja
8 Replies
2. Shell Programming and Scripting
Hello, I'm trying to do a substitution in vi. which adds a field for the year to a line.
If the line doesnt include a year, it should still add a field (although empty)
the fields are:
Country:number:number:name(and sometimes year):place
this is a desired in and output:
Sweden:55:32:John... (2 Replies)
Discussion started by: drareeg
2 Replies
3. Shell Programming and Scripting
How do i substitute ' with space in a file using sed or awk
i am getting the following two scenarios
1) xyz'd with xyz d
if i use
sed 's/xyz\\\'d/xy z/g'
it is taking ' after \ as closing expr for substitution
2) xyz';d with xyz d
please advice (8 Replies)
Discussion started by: mad_man12
8 Replies
4. UNIX for Dummies Questions & Answers
Hi everyone,
I am new to linux and practicing using vim editor.
I am trying to substitute a word hi to hello
and i can do this using by the following command
s/hi/hello
but this will only substitute only the first occurrence of hi
and
s/hi/hello/g will substitute every occurrence... (4 Replies)
Discussion started by: bonosungho
4 Replies
5. Shell Programming and Scripting
Hi,
What is the actual difference between these two? Why the following code works for process substitution and fails for command substitution?
while IFS= read -r line; do echo $line; done < <(cat file)executes successfully and display the contents of the file
But,
while IFS='\n' read -r... (3 Replies)
Discussion started by: royalibrahim
3 Replies
6. Solaris
Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies
7. Shell Programming and Scripting
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Discussion started by: aarora_98
6 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question.
How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'?
As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies
9. UNIX for Dummies Questions & Answers
In a file I want to globally change a "|" charater by a new line character.
I am using the command
1,$s/\|/??/g
Can anybody say what should I put in place of ?? in the above command? (3 Replies)
Discussion started by: uLearner
3 Replies
10. Shell Programming and Scripting
I am trying to substituted a variable to a file using sed. However, the value of that variable is not being substituted. Here is an example of my code.
lf='
'
v_whole="${1} ${2} ${3} $lf"
cp ${IPPDIR}/ctl/fax_sub_text_a.${4}.${5}.txt... (1 Reply)
Discussion started by: supercbw
1 Replies