10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
2. Shell Programming and Scripting
Hi guys,
I have to append the word count of a file at the end of the file name like this - > "filename_2345" where 2345 is the word count of "filename". How do i achieve this using one command ? I am not allowed to store the word count in a variable and then concatenate. Request your... (1 Reply)
Discussion started by: peter2312
1 Replies
3. Shell Programming and Scripting
Hi friends,
I have one XML file having below structure :-
INput XML file :-
<?xml version="1.0" encoding="UTF-8"?>
<START>
<A=value1>
<attr name1="a1">
</A>
<B=value2>
<attr name2="b1">
<attr name3="c1">
</B>
</START>
output xml file should be
=== (3 Replies)
Discussion started by: harpal singh
3 Replies
4. Shell Programming and Scripting
Hi folks,
Using shell, I am trying the append comma to every line of text.
the requirement is like, I have to open the txt file in unix and read line by line and should add comma at the end of every word to make it single line
txt file
-------
abc@gmail.com
bcd@gmail.com... (7 Replies)
Discussion started by: giridhar276
7 Replies
5. UNIX for Dummies Questions & Answers
Hi All
i need to delete a recurring word from point "n" till end of the file. there are other words in this file so i cannot use `dG`, can anyone help me out?
Kind regards
Brian (4 Replies)
Discussion started by: brian112
4 Replies
6. UNIX for Dummies Questions & Answers
I need to grep the word "hello" in each and every file. This word will be placed either at the end of the file or before the end of the file.
Ex:
file1: file2:
afdsaf dsfalk
fdsa weruoi
sdaf erwqiuo
fsdaf ... (5 Replies)
Discussion started by: sivakumar.rj
5 Replies
7. Shell Programming and Scripting
Can somebody help me with a script ....
Read a file /etc/inittab
find the string starting with rcml and move it entirely towards the end of file.
rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1
I basically want to change the startup sequence. (2 Replies)
Discussion started by: imanuk2007
2 Replies
8. Shell Programming and Scripting
My input file is multiline file and I am writing a script to search for a pattern and move the line with the pattern and the next line to the end of the file. Since I am trying to learn awk, I thought I would try it.
My input looks like the following:
D #testpoint 1
510.0
D #testpoint2 ... (5 Replies)
Discussion started by: banjo25
5 Replies
9. Shell Programming and Scripting
I'm rather new to scripting, and despite my attempts at finding/writing a script to do what I need, I have not yet been successful.
I have a file named "list.txt" of arbitrary length with contents in the following format:
/home/user/Music/file1.mp3
/home/user/Music/file2.mp3... (21 Replies)
Discussion started by: Altay_H
21 Replies
10. Shell Programming and Scripting
Hi
I want to read a flat file and add a word/value at the end of each line in the file and store the output in a temporary file. How can i do this? Plz help me with this.
Regards,
Saurabh (6 Replies)
Discussion started by: bhalotias
6 Replies