10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I'm not very familiar witrh sed or awk and hope the somebody can help me to solve my problem. I need to filter a text report using grep, sed or awk. I would like to cut out text lines with the pattern INFO and if exists the following lines of the pattern DETAILS. I need te keep the lines with... (4 Replies)
Discussion started by: Frankg
4 Replies
2. Shell Programming and Scripting
I have a file that contains RewriteRules for 200 countries (2 examples for 1 country below):
RewriteRule ^/at(/|/index.html|)$ http://%{HTTP_HOST}/locate/index.html?locale=de_AT
#&
RewriteRule ^/at_english(/|/index.html|)$ http://%{HTTP_HOST}/locate/index.html?locale=en_AT
I have... (5 Replies)
Discussion started by: usshadowop
5 Replies
3. Shell Programming and Scripting
I'm trying to take out strings from log files and add them to a csv.
For example, in the directory now, there are 2 log files. I get the following results:
sed -e '/custodian/b' -e '/packaged by/b' -e '/package name/b' -e '/Total Data (MB) Read/b' -e '/Begin Time/b' -e d *
packaged by =... (10 Replies)
Discussion started by: chipperuga
10 Replies
4. Shell Programming and Scripting
I have following requirement.
Say, my text file contains following patterns
{2010501005|XXGpvertex|9|0|17|0|{|{30100001|XXparameter_set|@@@@{{30001002|XXparameter|!prototype_path|$AB_COMPONENTS/Sort/Sort.mpc|3|2|Pf$|@{0|}}
}}@0|@315000|78500|335000|99000|114000|87000|17|And the Sort|Ab... (8 Replies)
Discussion started by: Shell_Learner
8 Replies
5. Programming
hi,
my fstab file content is like this along with some other lines:
/dev/vg0/var1 /var1 ext3 defaults 0 2
/dev/vg0/flx1 /flx1 ext3 defaults 0 2
/dev/vg0/var /var ext3 defaults 0 1
/dev/vg0/flx /flx ext3 defaults 0 2
I want to remove lines with /dev/vg0/var and... (5 Replies)
Discussion started by: success
5 Replies
6. Shell Programming and Scripting
sed -i 's:"ps -ef | grep $(cat $PID_FILE) | grep -v grep":"ps -C java -o pid,cmd | grep ${SERVER_NAME} | cut -d' ' -f1 | grep -v grep":g' scriptName
That's what I'm attempting to do. I'm attempting to replace this:
ps -ef | grep $(cat $PID_FILE) | grep -v grep
with this:
ps -C java -o... (5 Replies)
Discussion started by: cbo0485
5 Replies
7. Shell Programming and Scripting
my script:
FILE="$1"
echo "You Entered $FILE"
if ; then
tmp=$(cat $FILE | sed '/./!d' | sed -n '/regex/,/regex/{/regex/d;p}'| sed -n '/---/,+2!p' | sed -n '/#/!p' | sed 's/^*//' | sed -e\
s/*:// | sed -n '/==> /!p' | sed -n '/--> /!p' | sed -n '/regex/,+1!p' | sed -n '/======/!p' | sed -n... (1 Reply)
Discussion started by: omgsomuchppl
1 Replies
8. Shell Programming and Scripting
Haven't worked in bash for ages. did a good bit of shell scripting in regular sh, but have forgotten most of it.
I have several thousand php files that now include the following line at the end of the file. There is no LF or CR/LF before it begins, it is just concatenated to the final line of... (3 Replies)
Discussion started by: sjburden
3 Replies
9. Shell Programming and Scripting
Hi,
I have a file that I would like to translate using sed.
I can do some basic sed commands, but Im afraid this level is beyond me.
I have this file -
...alter...
..
...65536...
...
...65536...
...
...alter...
...
...65536...
etc
What I would like to do is replace the first... (11 Replies)
Discussion started by: one_ring99
11 Replies
10. Shell Programming and Scripting
Hello,
So i have this file called /apps/turnout which looks like that of the contents of the /etc/shadow (but not exactly)
the file has a long list in it. basically, the contents of this file looks something similar to the following:
jajajajalala:D#$#AFVAdfda
lalabavisof:#%R@fafla#$... (3 Replies)
Discussion started by: SkySmart
3 Replies