10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I had generated a report in my tool as followsoutput.txt
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
... (2 Replies)
Discussion started by: hemanthsaikumar
2. Shell Programming and Scripting
I have a file which has data in 8 lines:
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
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"?>
I need to insert two new lines after line#2, so that the output... (14 Replies)
Discussion started by: arjun_arippa
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
Filesystem 1M-blocks Used Available Use% Mounted on
/abc/def/xyz 34567 2345 12345 90% /test
... (4 Replies)
Discussion started by: stunnerz_84
6. Shell Programming and Scripting
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
I know 'sed' could be used to... (5 Replies)
Discussion started by: momin
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
set... (0 Replies)
Discussion started by: ziggycat
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:
egrep -l f?printf *.c | while read file;
do sed -i '1i\... (2 Replies)
Discussion started by: computethis
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'
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
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 ... (20 Replies)
Discussion started by: bsandeep_80