11-11-2009
i see. then see
here. The 2nd example prints before and after, i am sure you can change to cater to what you need.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i am still confusing on how to use sed, grep and awk if the input is not a file but a variable.
such as:
a="hello world"
b="how are you"
c="best wish to you"
d="222,333,444"
what if i want to check which variable $a,$b,$c,$d have contain "you"
what if i want to replace the word "you"... (9 Replies)
Discussion started by: 3Gmobile
9 Replies
2. UNIX for Dummies Questions & Answers
I have 2 files, in one file is a list of hex numbers, the other is what i need matched. Is it possible for me to specify to grep the list and have it go through the second file for each item in the list in the first file to match the lines? so this is like a cross-refference. (16 Replies)
Discussion started by: Adriel
16 Replies
3. Shell Programming and Scripting
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Discussion started by: hariza
4 Replies
4. Shell Programming and Scripting
Greetings all,
Unix rookie here, just diving into ksh scripting for the first time.
My question may seem confusing but please bear with me:
If I'm understanding everything I'm reading properly, it seems like the ksh language itself doesn't have a lot of string manipulation functions of... (2 Replies)
Discussion started by: DalTXColtsFan
2 Replies
5. Shell Programming and Scripting
Hi there, I have a Solaris machine with an ifconfig output similar to below
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
6. Shell Programming and Scripting
Hello,
I trying to extract text that is surrounded by xml-tags. I tried this
cat tst.xml | egrep "<SERVER>.*</SERVER>" |sed -e "s/<SERVER>\(.*\)<\/SERVER>/\1/"|tr "|" " "
which works perfect, if the start-tag and the end-tag are in the same line, e.g.:
<tag1>Hello Linux-Users</tag1>
... (5 Replies)
Discussion started by: Sebi0815
5 Replies
7. Shell Programming and Scripting
I have an input file
12.4 1.72849432773174e+01 -7.74784188610632e+01
12.5 9.59432114416327e-01 -7.87018212757537e+01
15.6 5.20139995965960e-01 -5.61612429666624e+01
29.3 3.76696387248366e+00 -7.42896194101892e+01
32.1 1.86899877018077e+01 -7.56508762501408e+01
35 6.98857157014640e+00... (2 Replies)
Discussion started by: chrisjorg
2 Replies
8. Shell Programming and Scripting
I've been working on this for 2 days and I'm not getting far. It is time to turn to you guys.
With the data below, I am trying to create a file that looks like this: I'd like to use some form of egrep I think.
AY#box#P04prod_to_contingency s AY#cmd#P04dump_cont_db s AY#cmd#P04get_on_ice_job s... (2 Replies)
Discussion started by: rawbi01
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a file with following sample data. I am also attaching the file.
(Est) (Est) Jobs Sch
Workstation Job Stream SchedTime State Pr Start Elapse # OK Lim
POOL #ACR_BILLING 0005 08/15 ... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a number of files containing the information below.
"""""
Fundallinfo
6.3950 14.9715 14.0482
"""""
I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
Discussion started by: Paul Moghadam
2 Replies
LEARN ABOUT FREEBSD
ljlatest
ljlatest(6x) XScreenSaver manual ljlatest(6x)
NAME
ljlatest - prints the most recent public posts on livejournal.com.
SYNOPSIS
ljlatest [--verbose] [--columns N]
DESCRIPTION
The ljlatest script reads the most recent public posts made to livejournal.com, and prints them on stdout, after doing a rudimentary con-
version of HTML to plain text.
This script is just a wrapper around
xscreensaver-text
--url http://www.livejournal.com/stats/latest-rss.bml
As of XScreenSaver 4.21, you can just use use above URL in the "Text URL" field on the "Advanced" tab in xscreensaver-demo(1).
BUGS
This program makes it seem like morons have invaded your screen saver.
The output is always ISO-8859-1, regardless of locale.
SEE ALSO
http://www.livejournal.com/, xscreensaver(1), xscreensaver-text(1), fortune(1), phosphor(6x), apple2(6x), starwars(6x), fontglide(6x),
dadadodo(1), webcollage(6x), driftnet(1) EtherPEG, EtherPeek
COPYRIGHT
Copyright (C) 2003, 2005 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for
any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software
for any purpose. It is provided "as is" without express or implied warranty.
AUTHOR
Jamie Zawinski <jwz@jwz.org>, 30-Aug-2003.
X Version 11 5.15 (28-Sep-2011) ljlatest(6x)