10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
Take this file...
Test01
Ref test
Version 01
Test02
Ref test
Version 02
Test66
Ref test
Version 66
Test99
Ref test
Version 99
I want to substitute every occurrence of Test{2} with a unique random number, so for example, if I was using sed, substitution would be something... (1 Reply)
Discussion started by: funkman
1 Replies
2. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
Write a shell script that will take the sum of two random number?
Ex: Random n1 +Random n2 = result
i tries to write it but i had some dufficulties
... (3 Replies)
Discussion started by: renegade755
3 Replies
3. Shell Programming and Scripting
Hello,
I have a file with a 1000 ids in the form of strings. I want to replace each id with a unique numbers in the whole file. each id is repeating in all the columns. I know I can use sed command but there are many ids in file which are need to be converted
example of input file
B752... (4 Replies)
Discussion started by: ryan9011
4 Replies
4. Shell Programming and Scripting
Hi experts,
My csv file looks like this
U;cake;michael;temp;;;;
U;bread;john;temp;;;;
U;cocktails;sarah;temp;;;;
I'd like to change the value fo 2nd column to cf+random number , which will look maybe something like this
U;cf20187;michael;temp;;;;
U;cf8926;john;temp;;;;... (7 Replies)
Discussion started by: tententen
7 Replies
5. Shell Programming and Scripting
Hi!
I need the following script:
- All numbers in a filename (0-9) have to be replace by a String ("Zero"-"Nine")
- The script has to go through all the files in the current directory and has to replace the numbers as described above...
I have no idea how to do this...
Thanks!
Michael (5 Replies)
Discussion started by: Michi21609
5 Replies
6. UNIX for Dummies Questions & Answers
I need a sed line that will take STDM111 and change it to STDM161
the STDM will always be constant but the 3 numbers after will be random, I just need it to always replace the middle number with 6 regardless of what the numbers are. (8 Replies)
Discussion started by: glev2005
8 Replies
7. Shell Programming and Scripting
Hi,
I am having trouble with generating random numbers. can this be done with awk?
So I have a file that looks like this:
23 30
24 40
26 34
So column1 is start and column2 is end. I want to generate 3 random #'s between start and stop:
So the output will look like this:
... (9 Replies)
Discussion started by: phil_heath
9 Replies
8. Shell Programming and Scripting
Hello,
in my shell script i have some multi-line text in a variable $TEMP - f.e.
blablahblah
blah blah
bla TARGET hgloglo
And i need to replace TARGET with text from another variable ($REPLACE), which is containing some text with nasty characters (\n, ", :, etc.) And stuff the altered text... (2 Replies)
Discussion started by: MilanCZ
2 Replies
9. Shell Programming and Scripting
Hello All,
I want to make a simple script which generate random number from 0 to 1000.
and simply display it.
Plz HELP!!!!!!
Regards,
Waqas Ahmed (2 Replies)
Discussion started by: wakhan
2 Replies
10. UNIX for Dummies Questions & Answers
Is anyone know some scripts to generate random number without repetition using bash; for example generate 10 different random numbers.
Thanks (8 Replies)
Discussion started by: asal_email
8 Replies