10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi I want to use sed to change a text files input into an awk script.
For example if the input says " chord -- english " I want to change this using sed 's/pattern 1 /pattern 2 /'g filename but I don't understand how to use part of the pattern 1 to input that into pattern 2 . Like after... (10 Replies)
Discussion started by: enforcer
10 Replies
2. UNIX for Beginners Questions & Answers
I have a bunch of text files like this:
Sample_S1_L001_R1.txt
Sample_S10_L001_R1.txt
Sample_S11_L001_R1.txt
I am using the following script to add a 0 to those files with a single digit after the S:
ls *.txt | sed 's/\(.*_S\)\(_.*\)/mv & \10\2/' | sh
And then the following script to... (4 Replies)
Discussion started by: Xterra
4 Replies
3. Shell Programming and Scripting
UNIX gurus
I need your help with the following (The server is an AIX box).
I have a text file with the following information:
********************************************************
SOME LINES
case
:WORD1
SOME LINES
:WORD2
SOME LINES
:WORD3
SOME LINES
esac
SOME LINES... (7 Replies)
Discussion started by: curiousmal
7 Replies
4. Shell Programming and Scripting
I have a bunch of file numbers in the file 'test':
I'm trying the above command to change all the instances of "H" to "Na+" in the file testsds.pdb at the line numbers indicated in the file 'test'. I've tried the following and various similar alternatives but nothing is working:
cat test |... (3 Replies)
Discussion started by: crunchgargoyle
3 Replies
5. Shell Programming and Scripting
I want change the file when the line contains $(AA) but NOT contains $(BB), then change $(AA) to $(AA) $(BB)
eg:
$(AA) something
$(AA) $(BB) something (7 Replies)
Discussion started by: yanglei_fage
7 Replies
6. Shell Programming and Scripting
So I'm new to this sed command and I am trying to create a script that replaces ip addresses when I name a file but can't tweak it to work.
Here is what it looks like:
#!/bin/bash
#
file=$1
#
sed -e 's/-CPUaddr 10.30.10.166/-CPUaddr 10.30.10.151/g' -i "$file"
sed -e 's/-CPUaddr... (10 Replies)
Discussion started by: uradunce
10 Replies
7. UNIX for Dummies Questions & Answers
The file is repeating blocks of text separated by a blank line. Some of the lines are unique.
e.g.:
This is unique line
This is line 2
This is line 3
This is line 4
This is unique line
This is line 2
This is line 3
This is line 4
...
The goal is to change/replace line 4... (2 Replies)
Discussion started by: uiop44
2 Replies
8. Shell Programming and Scripting
Hello,
I have a file which contains some line as follows,
9.9 TEMP
9.9 MUCOEFF
0.0 EPSILON
And I want to increase this MUCOEFF by 0.2 as
9.9 TEMP
10.1 MUCOEFF
0.0 ... (7 Replies)
Discussion started by: lorenzz
7 Replies
9. UNIX for Dummies Questions & Answers
We have several Printers that are pointing to a print server that is now defunct. I need to point these printers to the new print server.
I am aware I need to change the configuration in /usr/spool/lp/admins/lp/printers/printername/configuration as well as in /etc/printers.conf.
However my... (0 Replies)
Discussion started by: tugger
0 Replies
10. Shell Programming and Scripting
I have a file like below:
I want to delete the rows which begining with "BC" "CD" and "TY" .
then change every fields into one row like this
at last delete the head words :
USing awk to change it is not hard.
I want to know how to do this work using SED ?
Thank you!
... (4 Replies)
Discussion started by: bejgirl
4 Replies