10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I had generated a report in my tool as followsoutput.txt
43.35
9
i needed the script to generate a new file like below
i want to append the text to each of these lines of my filenewoutputfile.txt should be
Total Amount : 43.35
Record Count:9
Regards,
Vasa Saikumar.
... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
2. Shell Programming and Scripting
I have a file which has data in 8 lines:
10
34
6
1
4
46
67
31
I am trying to read each value into each different variable so that I use these variables in preparing my report.
Another option is to dynamically print each line values in the report like below:
users with privA:... (2 Replies)
Discussion started by: sarat949
2 Replies
3. Shell Programming and Scripting
Hi..wanted a help regarding inserting a newline in an xml file using shell script.
i've an xml file which has the following data.
1. <?xml version="1.0" encoding="UTF-8"?>
2. <group>
3. <name>odcm</name>
4. contd....
I need to insert two new lines after line#2, so that the output... (14 Replies)
Discussion started by: arjun_arippa
14 Replies
4. Shell Programming and Scripting
Hello Guys,
I request anyone to do me a small help in using diff command for following.
I am trying to compare two files for content and wish to keep the content after the comparison (The resultant file can't be blank)
However, the first lines would be different in both files and I need diff... (2 Replies)
Discussion started by: rockf1bull
2 Replies
5. Shell Programming and Scripting
Hi,
How can i split a line of string into two lines.
I would like to format the below string:
Filesystem 1M-blocks Used Available Use% Mounted on /abc/def/xyz 34567 2345 12345 90% /test
to
Filesystem 1M-blocks Used Available Use% Mounted on
/abc/def/xyz 34567 2345 12345 90% /test
... (4 Replies)
Discussion started by: stunnerz_84
4 Replies
6. Shell Programming and Scripting
Hi Folks,
I was given a task to append three IP's at the end of a specific (and unique) line within a file on multiple servers.
I was not able to do that with the help of a script. All I could was:
for i in server1 server2 server3 server4
do
ssh $i
done
I know 'sed' could be used to... (5 Replies)
Discussion started by: momin
5 Replies
7. Ubuntu
Hi,
having some problems getting commandline mail to work for root user in ubuntu.
Ive installed the following packages - msmtp & mailx and the cert for gmail.
I've created 3 files: mailrc and msmtprc in /home/username directory
and /etc/exim4/passwd.client
mailrc
------
set... (0 Replies)
Discussion started by: ziggycat
0 Replies
8. Shell Programming and Scripting
I am writing a shell script that checks all .c files to see if they use fprintf or printf. If a file does, then the line #include <stdio.h> is added to the top of the file, unless it's already there.
This is what I've got:
#!/bin/sh
egrep -l f?printf *.c | while read file;
do sed -i '1i\... (2 Replies)
Discussion started by: computethis
2 Replies
9. Shell Programming and Scripting
I have a file called vm.cfg which looks like follows
# cat vm.cfg
acpi = 1
apic = 1
builder = 'hvm'
device_model = '/usr/lib/xen/bin/qemu-dm'
disk =
kernel = '/usr/lib/xen/boot/hvmloader'
memory = '300'
name = 'vm_temp'
on_crash = 'restart'
on_reboot = 'restart'
pae = 1
serial =... (5 Replies)
Discussion started by: pinga123
5 Replies
10. UNIX for Advanced & Expert Users
can someone help me with the find and replace command.
I have a input file which is in the below format:
0011200ALN00000000009EGYPT 000000000000199900000
0011200ALN00000000009EGYPT 000000000000199900000
0011200ALN00000000008EGYPT 000000000000199800000
0011200ALN00000000009EGYPT ... (20 Replies)
Discussion started by: bsandeep_80
20 Replies