10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
Since i'm relatively new in shell script need your guidance.
I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder.
so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
Discussion started by: prajaktaraut
13 Replies
2. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 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
Hello,
I have a file filled with dates, such as:
04-08-2011 message
04-08-2011 message
03-08-2011 message
01-08-2011 message
31-07-2011 message
24-07-2011 message
15-07-2011 message
13-12-2008 message
26-11-2007 message
And I want to delete those lines whose date is older than 10... (5 Replies)
Discussion started by: asanchez
5 Replies
5. Shell Programming and Scripting
Hello, I have a file like this one:
03-07-2011 sunz02 message1
03-07-2011 sunz02 message2
03-07-2011 sunz02 message3
01-07-2011 sunz02 message1
01-07-2011 sunz02 message2
01-07-2011 sunz02 ... (1 Reply)
Discussion started by: asanchez
1 Replies
6. Shell Programming and Scripting
I want to delete all lines from a file (orig_file) that contain the regex values (bad_inv_list)
I tried a for each loop with sed but it isn't working
for file in `cat bad_inv_list`;
do
sed '/$file/d' orig_file > pared_down_file.1
mv pared_down_file.1 orig_file
done
I've added... (2 Replies)
Discussion started by: verge
2 Replies
7. UNIX for Dummies Questions & Answers
I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies
8. Shell Programming and Scripting
Hi,
I need to insert two new lines in a file:
The file:
".....
......
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
....
....
"
I need to add the lines:
LD_LIBRARY_PATH='$LD_LIBRARY_PATH:$APACHE_HOME/modules'
DOWNLOADMODULE_CONF_PATHNAME='$APACHE_HOME/conf/DWLModule.cfg'
right... (2 Replies)
Discussion started by: potro
2 Replies
9. Shell Programming and Scripting
Hi There
I have this file that I would like to add entries to, however, there is a "}" as the last line that I need to keep. Basically i would like to know how I can write a script that will add new lines at the second to last line position (ie always add new line above the close bracket)
... (17 Replies)
Discussion started by: hcclnoodles
17 Replies
10. Shell Programming and Scripting
I have a file which has some lines starting with a particular word. I would like to delete 5 lines before each such line containing that particular word.
eg:
line1
line2
line3
line4
line5
line6
"particular word"...
I would like to delete line2-line6 and all such occurences in that... (4 Replies)
Discussion started by: ramu_1980
4 Replies