10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have text with upper and lower case words. I want to find something and replace it with something new. But it should match the case - Meaning - it should replace old upper cased word with NEW upper case word and lower with lower.
example:
this text is very simple TEXT.
now I want to replace... (5 Replies)
Discussion started by: grep_me
5 Replies
2. Shell Programming and Scripting
There's an input file(input.txt) which has the following details :
CBA
BA
<Please note the second record has a LEADING WHITESPACE which is VALID>
I am using the following code to read the content of the said file line by line:
while read p ; do
echo "$p"
done < input.txt
This is the... (1 Reply)
Discussion started by: kumarjt
1 Replies
3. Shell Programming and Scripting
I want to replace the whitespace with Pipe symbol to do a multiple pattern matching for the whole text "mysqld failed start" and same as for other text messages Below are the messages stored in a file seperate by whitespace
mysqld failed start
nfsd mount failed
rpcbind failed to start
for... (6 Replies)
Discussion started by: kar_333
6 Replies
4. UNIX for Dummies Questions & Answers
Hello all. I am a beginner UNIX user who is using UNIX to work on a bioinformatics project for my university.
I have a bit of a complicated issue in trying to use sed (or awk) to "find and replace" bases (letters) in a genetics data spreadsheet (converted to a text file, can be either... (3 Replies)
Discussion started by: Mince
3 Replies
5. Shell Programming and Scripting
Hi,
I have a string of letters that are upper and lower case. I would like to replace all the lowercase letters with N. Also, there are only 4 letters, so it may be easier to replace each lower case letter with N. Either way, I do not know know to do this.
Example line
... (6 Replies)
Discussion started by: mikey11415
6 Replies
6. Shell Programming and Scripting
hello,
i have this string:
variable="1234 /PARAMETER_1:text /PARAMETER_2:othertext"
i tried to do
expr match $variable '.*\(*\)'
but i keep getting expr error
i need to extract the word text...
thank you (4 Replies)
Discussion started by: Aloush89
4 Replies
7. Shell Programming and Scripting
Hi,
Here's my requirement...
There's a SFTP script with batchmode which logs in to the remote site and list all .done files to pick real files (see the following snippet)
echo "-ls $FTP_PATH/*.done" > temp_file
fileNames=`sftp -b temp_file $user@$ip`
isDoneFile=`echo $fileNames |... (2 Replies)
Discussion started by: dips_ag
2 Replies
8. Shell Programming and Scripting
I have a bunch of files that are like this:
<htmlstuffs>HTML STUFFS</endhtmlstuffs>
<h1>Header</h1>
<htmlstuffs>HTML STUFFS</endhtmlstuffs>
<h1>Unique</h1>
<html stuffs>HTML STUFFS</endhtmlstuffs>
And Here's what I'd like it to look like:
<htmlstuffs>HTML STUFFS</endhtmlstuffs>... (2 Replies)
Discussion started by: kason
2 Replies
9. Shell Programming and Scripting
Hi,
i have a file which contains data in fixed length. each row contains data of 10 characters fixed length. The data in the file appears like 4567782882
some times i may recieve dat less than fixed length of 10. in such a case i find nulls appended at the trailing spaces when i do a... (2 Replies)
Discussion started by: meeragiri
2 Replies
10. UNIX for Dummies Questions & Answers
Hello,
Im trying write a bash sript to search a file and identify any file names that contain a space at the end of them.
I was trying to use the grep command but I can find how I would identify the character I'm looking for.
Any help would be grately appreciated. (2 Replies)
Discussion started by: gintreach
2 Replies