Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: zazzybob
1,899
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,177
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,282
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...
1,720
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,546
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
13,431
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...
995
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/
7,303
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...
1,774
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...
86,400
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 ...
3,310
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,190
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...
132,996
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
134,510
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
37,101
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
32,009
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...
13,741
Posted By zazzybob
sed -n '1899 p' somefile Cheers ZB
sed -n '1899 p' somefile


Cheers
ZB
17,166
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 |...
28,901
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...
37,574
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...
63,936
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...
21,753
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...
52,938
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

 

Featured Tech Videos

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