10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
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
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)
should be replaced by just '=='
Note :- single character should be replaced. (=... (13 Replies)
Discussion started by: RedRocks!!
4. Shell Programming and Scripting
just want to ask how you do this?
a="b=abc def ghi"
c=<all the strings after b=>
output will be
abc def ghi
thanks!! (1 Reply)
Discussion started by: h0ujun
5. 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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
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
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