10 More Discussions You Might Find Interesting
1. HP-UX
Hello,
I have spent a couple of hours trying to answer this myself, so forgive me if the answer is simple but I have tried.
I have a text file generated from svn log output which contains a list of files.
Two regexps im using are
*
and
*
They both work but some lines has a mixture... (7 Replies)
Discussion started by: YogaBija
7 Replies
2. Shell Programming and Scripting
Hi,
i "tried" to sort data by date. So far, i used sed to take the data from the last and the actual month. Now, after changing the year it is not working properly.
i use:
GNU bash, version 4.2.45(1)-release (x86_64-suse-linux-gnu)
sed -n '/\//p' $Home/../scripte/pd_0.txt
y is a... (6 Replies)
Discussion started by: IMPe
6 Replies
3. Shell Programming and Scripting
I want to print out the lines that have the max value in column 3. and count the occurrence of column 1; if there are more than one occurrences, line with highest column 2 value will be printed.
I have this data:
input:
AV 234 25
AV 256 76
AS 421 34
AV 124 76
BD 136 71
BD 241 76
AW... (10 Replies)
Discussion started by: aydj
10 Replies
4. UNIX for Advanced & Expert Users
$ echo "a,0,0,0,b,0" | sed 's/,0,/,1,/g'
gives output as
$ a,1,0,1,b,0
rather than as
a,1,1,1,b,0
how can i solve this problem
Thanks a lot in advance....
Use code tags. (4 Replies)
Discussion started by: manishma71
4 Replies
5. Shell Programming and Scripting
Hi,everyone:
I'm new to shell, and now get trouble with some script:
line=`/usr/xpg4/bin/awk '/^(*\|){2}'"$CR"'/ {print $0}' ${TIER4FILE}|grep -v
OSNAME=`sed -n ''$LINE'p' $DATALOC/os`
sort +1 /tmp/LhasaCRs2 > /tmp/LhasaCRs1
I cannot understand the "{2}" here. My mentor said it... (1 Reply)
Discussion started by: mycoy
1 Replies
6. Shell Programming and Scripting
Sed with sort doesnt work
The below code doesnt work:
sed -e '/^$/d' -e 's/,/|/g' | sort -t"|" -k1,1 -u file1
when i seperate them it work but i have to create intermediate file which i dont want to:
sed -e '/^$/d' -e 's/,/|/g' file1 > file2
sort -t"|" -k1,1 -u file2
Help... (2 Replies)
Discussion started by: pinnacle
2 Replies
7. Shell Programming and Scripting
i have a file acc.sh which has about 10 lines and then i have defined $var which has a line number in it (say 5). i want to extarct from line 5 to the end of the file and put the output into another file. I have used
sed -n $var,'$p' acc.sh | tee abc.sh
but at times it does'nt work and gives an... (6 Replies)
Discussion started by: lassimanji
6 Replies
8. Shell Programming and Scripting
root:x:0:0:0000-Admin(0000):/:/sbin/sh
rootcsh:x:0:1:0000-Admin(0000):/:/bin/csh
nocol:x:6312:630:NOCOL Monitor,,,:/usr/local/lib/nocol-client:/usr/local/bin/bash
nobody:x:60001:60001:uid no body:/:/usr/local/bin/bash
noaccess:x:60002:60002:uid no access:/:/usr/local/bin/bash... (2 Replies)
Discussion started by: sonicstage
2 Replies
9. Shell Programming and Scripting
I have a group of xml files and I need to insert 3 parameters just after this line in each file:
---------------Pattern to be searched for-------------------------
<!--The following configuration is a test configuration-->
---------------Parameters to be added---------------------------... (11 Replies)
Discussion started by: collern2
11 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm trying to use the sed command but I'm not sure how to use it properly. I've read the man pages for the sed command but I'm still unsure on how to use it.
Basically I have a file with the words male and female written multiple times. I want to swap the word male for female and... (4 Replies)
Discussion started by: tugade
4 Replies