10 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
So, I have a folder, containing subdirs like this:
52334d50
52365245
524b4450
524f3350
52533950
52535050
52555550
now I want to go ahead and rename all those folder:
hex -> ascii (8 Replies)
Discussion started by: pasc
8 Replies
2. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I have a question regarding extracting parts of a string and the meaning of # and % in the syntax. I created an example below.
# filename=/first/second/third/fourth
#
# echo $filename
/first/second/third/fourth
#
# echo "${filename##*/}"
fourth
#
# echo "${filename%/*}"... (3 Replies)
Discussion started by: shah9250
3 Replies
4. Shell Programming and Scripting
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
Discussion started by: jcdole
4 Replies
5. Shell Programming and Scripting
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies
6. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
7. Shell Programming and Scripting
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies
8. Shell Programming and Scripting
i read the "cat" manpages,
but i could not find to tell it like
"read file XY.BIN from byte 1000 to byte 5000"
can somebody please point me into the right direction?
cat would be the ideal tool for my purpose, the way it behaves, but i miss this ranges option.
thanks for any input. (2 Replies)
Discussion started by: scarfake
2 Replies
9. Shell Programming and Scripting
Hi people,
i have a nice problem to solve..
in an text page i must change all the "*.php" occourences to the respective lowercase..
Example:
...
<tr><td>
<form action="outputEstrazione.php" method="get">
<table cellspacing='0,5' bgcolor='#000000'><tr><td>
<font size='2'... (5 Replies)
Discussion started by: marconet85
5 Replies
10. Shell Programming and Scripting
input string="3MMTQSZ348GGMZRQWMJM4SD6M"
output string="3MMTQ-SZ348-GGMZR-QWMJM-4SD6M"
using linux shell script (4 Replies)
Discussion started by: pankajd
4 Replies