10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
2. Shell Programming and Scripting
Hi All,
I am novice to Unix and I need your expert advice for the below task.
There is a KSH script file in which I need to replace few line as per the below expectations. So my file look like as
# Host Setup Command:
Line 1
Line 2
Line 3
Line 4
Line Any... (6 Replies)
Discussion started by: rupid0609
6 Replies
3. Shell Programming and Scripting
Hi,
I posted a topic requesting help with a script to replace certain things in an XML file
https://www.unix.com/shell-programming-scripting/202943-replace-string-newline-2.html
The replies helped a lot but I found that on big files it didn't work properly.
The file I'm amending is... (5 Replies)
Discussion started by: Ste_Moore01
5 Replies
4. Shell Programming and Scripting
Hi,
Below is the script which will find a particular text and replace with another one in a group of files under a directory /test
#!/bin/bash
old=$1 --- first input old text
new=$2--- input new text
cd /test --- folder into which files need to be checked
for y in `ls *`;
do sed... (2 Replies)
Discussion started by: chetansingh23
2 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to write a script which will find a particular text in certain group of files under a directory and if found correctly it will replace them with a new text in all the files.
Could any one let me know how do i find the text in many files under a directory.
Thanks (3 Replies)
Discussion started by: chetansingh23
3 Replies
6. Linux
Hello everyone,
I am trying to do a simple script (shell or perl) for a bioinformatic problem, where I want to use a list from file2 and append this information to file1 (output).
Example:
File1
>Apple1
GAGACGATTTATATATAGAAGAGAG
>Banana2
CAGAGAGAGAGACCCCCCCCCCCC
File2
>Apple1 ... (2 Replies)
Discussion started by: herasj01
2 Replies
7. Shell Programming and Scripting
First sorry for my bad english.
I have search the forum without finding anything I fully understand, so I ask here.
The problem:
I have a config file that I will chance onece a day. One line only.
I know the linenumber, and I also know the start of the line.
Line number 19, and the start... (3 Replies)
Discussion started by: Hempe
3 Replies
8. Shell Programming and Scripting
I need a little help with a shell script. I want to be able to specify parameters so that the script searches multiple files (specified as parameters) and only modifies the file if it finds the string of text. For the files it doesn't find the string of text within, it should leave it alone.
... (4 Replies)
Discussion started by: joebaber
4 Replies
9. Shell Programming and Scripting
I have a file something like this (except much larger amount of rows/data)
0001 blue testing1
0002 blue testing2
0006 blue testing3
0232 red testing4
2143 blue testing5
3453 blue testing6
In a script I want to replace the word red with blue where the line begins with a... (4 Replies)
Discussion started by: frustrated1
4 Replies
10. UNIX for Dummies Questions & Answers
hai everybody,
i am new to scripting,i have to replace a value with another value ina script...both the values i have got in two seperate variables...can anyone give me the syntax how to do this in a shell script...
ie.
e1=$5,e2=$6
v2=$1,v3=$7
now i want to... (2 Replies)
Discussion started by: Babu
2 Replies