10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey guy's....
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
9 Replies
2. Shell Programming and Scripting
Hi
I have written a shell script which used sed code below
sed -i 's/'"$Pattern"'/ /g' $FileName
I want to count the length of Pattern and replace it with equal number of spaces in the FileName.
I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Discussion started by: rakeshkumar
8 Replies
3. Linux
Please help me, wasted hrs:wall:, to find this soulution:-
I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times)
Examples
1. '==='
2. '===='
3. '======='
should be replaced by just '=='
Note :- single character should be replaced. (=... (13 Replies)
Discussion started by: RedRocks!!
13 Replies
4. Shell Programming and Scripting
hello
just want to ask how you do this?
a="b=abc def ghi"
c=<all the strings after b=>
echo $c
output will be
abc def ghi
thanks!! (1 Reply)
Discussion started by: h0ujun
1 Replies
5. Shell Programming and Scripting
Hello there,
I need some help.
I have a file containing this :
$ cat file
PARM1=(VAL11),PARM2=(VAL21,VAL22,VAL23),PARM3=(VAL31),PARM4=(VAL41,VAL42)
and I need to replace all the ',' by '|' but only those which are between brackets.
Output would be :... (10 Replies)
Discussion started by: Sephiburp
10 Replies
6. Shell Programming and Scripting
Gurus,
You know, I believe you do:-), the comnand uname -r give you the kernel version:
serverA:~# uname -r
2.6.26-1-xen-amd64So, I want to replace this output inside in the line below that is inside the file:
kernel = '/boot/vmlinuz-2.6.26-1-xen-amd64'Suppose, you move this file to ther... (2 Replies)
Discussion started by: iga3725
2 Replies
7. Shell Programming and Scripting
Hi all,
Suppose I have a file with the contents below, and I only want to print words %S_ then | sort -u.
------------------------------
The %S_MSG that starts with '%.*s' is too long. Maximum length is %d.
The %S_MSG name '%.*s' contains more than the maximum number of prefixes. The... (5 Replies)
Discussion started by: poldo
5 Replies
8. Shell Programming and Scripting
Hello
I have a document and in this document I have several occurrence of "VAR == xxxxxxx" and xxxxx can be anything. I don't know what it is. I want to replace the 'xxxxx's with something I know.
What I know however, is the line numbers of the VAR =='s in the file.
How can I replace... (1 Reply)
Discussion started by: alirezan
1 Replies
9. Shell Programming and Scripting
Hey guys, I have a file that I've slowly been awking, seding, and greping for data entry. I am down to pull the addresses out to insert them into an excel file. Each address is a few lines, but i want to put a semicolon delimiter in between each address so I can export the text file into excel and... (6 Replies)
Discussion started by: Cocoabean
6 Replies
10. Shell Programming and Scripting
Hi,
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
done
My problem is what if files are named... (6 Replies)
Discussion started by: csejl
6 Replies