10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello;
I am not good at file and stream editing. I need to replace a few digits in two files. The lines in files looks like this:
Line in the first file, /dw300/data/obe/2019273.L800JR.1909.273
Line in second file, 1|2019273.L800JR.1909.273
I will write a function to connect to... (7 Replies)
Discussion started by: duke0001
7 Replies
2. UNIX for Dummies Questions & Answers
How to replace a character followed by a digit using sed? For example lets say I have this file -
a1 3242134 54235435 3241235
a2 3214345 45325626 3125435
a3 4236577 54365376 6865678
.
.
.
a3000 5432534 32546546 3254365
I want to replace all... (6 Replies)
Discussion started by: saleheen
6 Replies
3. Shell Programming and Scripting
HCPM1ONDB00014800011800000589009211201
L201307022013070228AUD 00000000031. 000965105800000000000000000000000 MOBITV KEYA ... (4 Replies)
Discussion started by: mirwasim
4 Replies
4. Shell Programming and Scripting
Hi experts,
I have two values in the file :
For example :
partcamt = 72.90
partdamt=27.9
I need to convert these values into 6 digits and ignore the "." sign so that the desired desired output is :
total value= 0072000027900
Currently I am using the following code :
... (3 Replies)
Discussion started by: nua7
3 Replies
5. Shell Programming and Scripting
Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows:
2012-01-18 string of words here 123.jpg
2012-01-18 string of words here 1234.jpg
2012-01-18... (2 Replies)
Discussion started by: Buzzman25
2 Replies
6. Shell Programming and Scripting
Hi,
I have a text file with an array of numbers such as :
123 1 456 45 9817 1 45
I would like to replace the digit "1" in a text file with "A". So it looks like this:
123 A 456 45 9817 A 45
If I use sed 's/1/A/g', I get
A23 A 456 45 98A7 A 45
I... (3 Replies)
Discussion started by: jejeking
3 Replies
7. Shell Programming and Scripting
I would like to search between two a string. I thought this would be easy. The is always at the beginning of a line.
The code:
gawk '/^/{d=$1},/searchstring/,/^(d+1)/'
or
gawk '/^/,/searchstring/,/^/'
did not return the desired result.
inputfile.txt
999 some text searchstring some... (6 Replies)
Discussion started by: sdf
6 Replies
8. Shell Programming and Scripting
i want to parse a string and only display the digits in that string... How would i accomplish this with sed command.
For example.
input string: " 033434343 dafasdf"
output string: 03343434
Thanks (2 Replies)
Discussion started by: timmylita
2 Replies
9. Shell Programming and Scripting
Hi Folks
Probably an easy one here but how do I get a sequence to get used as mentioned. For example in the following I want to automatically create files that have a 2 digit number at the end of their names:
m@pyhead:~$ for x in $(seq 00 10); do touch file_$x; done
m@pyhead:~$ ls file*... (2 Replies)
Discussion started by: amadain
2 Replies
10. Shell Programming and Scripting
We have a large number of oracle database related scripts that utilize the environment variables $ORACLE_SID and $DBNAME. In a single instance database the $ORACLE_SID is the same as the database name $DBNAME. So we have simply set DBNAME = $ORACLE_SID. However, now that we are clustering with RAC,... (5 Replies)
Discussion started by: Squeakygoose
5 Replies