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. Shell Programming and Scripting
I have a file
H,20180624200732,VPAS,TRANS_HDR,20180724,
VPAS.TRANS_HDR.20180724.01.txt, ,93,
T,1,
I have to change and instead first comma put ",1" like below
H,20180624200732,VPAS,TRANS_HDR,20180724,
VPAS.TRANS_HDR.20180724.01.txt,1,93,
T,1,
I made
sed "2s/, /,1/"... (8 Replies)
Discussion started by: digioleg54
8 Replies
3. 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
4. UNIX for Dummies Questions & Answers
Hi all..,
I have problem when i want to take every number in my file.
this is my file look like..
errorpath.csv
error=29
error=34
error=2
error=3
error=6
error=5
error=36
error=36
error=36
error=36
error=36
error=36 (9 Replies)
Discussion started by: weslyarfan
9 Replies
5. 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
6. Shell Programming and Scripting
Hello
My problem is that I want to change some specific numbers in a file. It is like,
2009 10 3 2349 21.3 L 40.719 27.388 10.8 FRO 7 0.8 1.1LFRO 2.6CFRO 1.1LMAM1
GAP=157 1.69 5.7 5.9 5.8 0.5405E+01 0.4455E+00 0.1653E+02E
STAT SP IPHASW D HRMM SECON CODA AMPLIT... (11 Replies)
Discussion started by: miriammiriam
11 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
Hi,
i have the below files in the wrk folder. File names are
AAB0001.R
BBA0002.R
CCDC0003.R
AAB0002.R
AAB0034.R
BBA0081.R
DDDE0008.R
i need to change the file name USING pattern and number. output like below :wall:
AAB0001.R
AAB0002.R
AAB0003.R
BBA0001.R
BBA0002.R
CCDC0001.R... (3 Replies)
Discussion started by: krbala1985
3 Replies
9. Shell Programming and Scripting
Hi
I want to create a configuration file from a template one.
The only thing to change for now is the port number that I need to take from another file that has this format:
server:port
So I need to take the 2nd field.
server is passed in the script argument.
how to do that? I... (1 Reply)
Discussion started by: melanie_pfefer
1 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