10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to replace part of string in file, the string format is below: I can use ABCD to find string, then replace values after "=" sign
my OS is SunOS 5.10 Generic_150400-64 sun4v sparc sun4v
... (9 Replies)
Discussion started by: green_k
2. Shell Programming and Scripting
I new here,
But im working on a school project, and I am not really good at programming. In fact, this is the only programming class that I need because programming is not what I am majoring in.
But I have everything done in this shell script except for this last part.....
... (9 Replies)
Discussion started by: hxdrummerxc
3. Shell Programming and Scripting
I need some help.
I have a file containing this :
$ cat file
and I need to replace all the ',' by '|' but only those which are between brackets.
Output would be :... (10 Replies)
Discussion started by: Sephiburp
4. Shell Programming and Scripting
I need to Replace a part of string in between one complete string.
in the file the value is as:
In script we are having a variable code=$3, where $3=ab
final output should be jobnm_ab_xyz_001.
But it is not working. Your help will be... (1 Reply)
Discussion started by: vee_789
5. Shell Programming and Scripting
Can someone tell me how I can do this?
Say file1.txt contains:
today is monday
the 22 of
and file2.txt contains:
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
6. UNIX for Dummies Questions & Answers
I have variable inside shell script - from_item.
from_item = 40.1'1/16
i have to first find out whether FROM_ITEM contains single quote(').
If yes, then that need to be replace with two quotes ('').
How to do it inside shell script? Please note that inside shell script........ (4 Replies)
Discussion started by: yogichavan
7. Shell Programming and Scripting
I am taking the current time using localtime function in perl. For example if the time is:
$time = "12:3:10";
I have to replace the value 3 (03) i.e second position to be 03.
The output should be:
But if the other string for example:
$str:... (1 Reply)
Discussion started by: vanitham
8. UNIX for Dummies Questions & Answers
I am trying to find words in a text with a certain ending with sed and replace them with themselves but wrapped in tabs
ex.: The fish swims in the water. -> searching for -ms ending
The fish <tab>swims<tab>in the water.
I've been trying all sorts of commands and get either an error... (5 Replies)
Discussion started by: stinnes
9. UNIX for Dummies Questions & Answers
i have a file name like abcd_vbnh.a_p
i have to copy it as abcd_vbnh.a every time...
in unix not in perl please (7 Replies)
Discussion started by: madhu_aqua14
10. Shell Programming and Scripting
I have files that are named front1.txt to front999.txt. They are all in the same directory. To change "front" to "back", I am doing something like this.
for file in *.txt; do
new=`echo $file | sed 's/^**/back/g'`
mv $file $new
My problem is what if files are named... (6 Replies)
Discussion started by: csejl