Search Results

Search: Posts Made By: zazzybob
2,374
Posted By zazzybob
Using sed: $ sed 's/^[^=]*= \([^ ]*\)[...
Using sed:


$ sed 's/^[^=]*= \([^ ]*\)[ ]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)\..*$/\1 \2/' foo.txt
cmiHOST06 10.26.107
cmiHOST05 10.26.12
cmiHOST05 10.26.1


Cheers,
ZB
5,685
Posted By zazzybob
You could do this with Expect (Expect - Expect -...
You could do this with Expect (Expect - Expect - Home Page (http://expect.sourceforge.net/)).
Forum: Hardware 02-08-2013
3,516
Posted By zazzybob
As you're experiencing errors across both disks...
As you're experiencing errors across both disks now, are you sure it isn't a controller issue? Presuming the server is still under support you should get Oracle to look at it ASAP.

Run prtdiag too...
2,574
Posted By zazzybob
Hi, Moving a text file just renames the text...
Hi,

Moving a text file just renames the text file - no conversion is happening.

You'll need to consult the tools available on your system - for example on most modern Linux systems you can use...
Forum: Red Hat 02-02-2013
3,712
Posted By zazzybob
IPTABLES_MODULES in...
IPTABLES_MODULES in /etc/sysconfig/iptables-config should be updated to include a space-separated list of modules to load - so in your case:


IPTABLES_MODULES=”ip_conntrack_netbios_ns...
Forum: Solaris 01-31-2013
16,531
Posted By zazzybob
Sun and now Oracle have insisted that init...
Sun and now Oracle have insisted that init scripts are "legacy" and will be removed in a later Solaris release. Also, they no longer guarantee the order in which they'll be started or stopped, as the...
1,279
Posted By zazzybob
$ sed 's!^\(.*\)/[^/]*$!\1/!' gogok.txt ...
$ sed 's!^\(.*\)/[^/]*$!\1/!' gogok.txt
/media/gogo/6651-FEAB/Desktop/
/media/gogo/6651-FEAB/
/media/gogo/6651-FEAB/linux/
/media/gogo/6651-FEAB/eks/HDD.Regenerator.2011-RES/INFOS/
8,310
Posted By zazzybob
This is why whenever I run rm -rf from a script,...
This is why whenever I run rm -rf from a script, my first run is ALWAYS:

...
#rm -rf $something
echo "we will be removing: $something"
...

i.e. initially comment out the rm and have it echo...
2,835
Posted By zazzybob
This doesn't give the desired output. Some...
This doesn't give the desired output. Some changes make it work:


# sed "s/^\(.\{3\}\)\(.\{2\}\)\(.\{4\}\)\(.\{2\}\)\(.*\)/\1|\2|\3|\4|\5/g" anup.txt
131|23|3242|34|234234234234234234234234...
96,004
Posted By zazzybob
On a modern *nix system, gzip -d will do the work...
On a modern *nix system, gzip -d will do the work of older utilities such as uncompress - from man gzip


gunzip can currently decompress files created by gzip, zip, compress, compress -H or ...
5,906
Posted By zazzybob
You should also ensure the scripts you're calling...
You should also ensure the scripts you're calling are in your $PATH or else specified via absolute paths.
1,959
Posted By zazzybob
I think it's best to be a little more verbose...
I think it's best to be a little more verbose when specifying commands like this - especially within scripts. A year later when you come back to look at this (especially since you are asking for help...
138,434
Posted By zazzybob
Try locate filename If you don't...
Try

locate filename


If you don't have locate (or updatedb hasn't been run recently), try

find / -name "filename" -type f -print


Cheers
ZB
143,127
Posted By zazzybob
echo "Subject: Testing" | cat - text |...
echo "Subject: Testing" | cat - text | /usr/lib/sendmail -F me@here.com -t you@there.com

Cheers
ZB
39,318
Posted By zazzybob
Just read your additional requirement RE:...
Just read your additional requirement RE: attachment...


( cat ./mailheader ./mailbody && uuencode attachment.txt attachment.txt ) | /usr/lib/sendmail -t

Cheers
ZB
33,524
Posted By zazzybob
Just for info: If you have GNU coreutils...
Just for info: If you have GNU coreutils installed, you'll find the tac utility (reversed cat :rolleyes: ) does the job of reading a file from bottom to top. But this won't find your match and break...
14,824
Posted By zazzybob
sed -n '1899 p' somefile Cheers ZB
sed -n '1899 p' somefile


Cheers
ZB
18,546
Posted By zazzybob
A slight variation on bhargav's script to ensure...
A slight variation on bhargav's script to ensure that only numeric digits are passed, and symbols as well as letters are rejected....

#!/bin/sh

echo "Enter number"
read val

if echo $val |...
31,111
Posted By zazzybob
You probably won't have nawk, but you'll have...
You probably won't have nawk, but you'll have gawk - normally "awk" is hard/soft linked to gawk anyway....

which gawk
which awk
which nawk
etc... to see what you have in your path...

Cheers...
38,033
Posted By zazzybob
Just for information, if you're using GNU date,...
Just for information, if you're using GNU date, you can do some *very* cool stuff with the "-d" option like

$ # get yesterdays date and format the output
$ date -d "yesterday" +"%d %b %Y"
10 Jan...
64,078
Posted By zazzybob
Just for info, newer shells like bash and ksh...
Just for info, newer shells like bash and ksh allow more "usual" short circuit operator syntax of && and || so you can do things like

[[ -d file1 && -d file2 ]] || echo "Both files are not...
22,355
Posted By zazzybob
Please don't post duplicate threads in multiple...
Please don't post duplicate threads in multiple forums. If somebody can offer you their assistance, they will - posting more than once will not yield a faster response! I have removed the duplicate...
55,285
Posted By zazzybob
A script such as this will name the files...
A script such as this will name the files out.100, out.200 where the number corresponds to whatever follows "DOC"


#!/bin/sh

while read line
do
if echo $line | grep DOC; then
...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy