Search Results

Search: Posts Made By: kbrede
12,385
Posted By kbrede
This seems to work, you forgot the first "'". ...
This seems to work, you forgot the first "'".

sed -e '/_;/d' -e 's/) \(.*\)/ c\1/' file

Kent
6,955
Posted By kbrede
There are various live Linux CDs that might work...
There are various live Linux CDs that might work for you. Knoppix is one http://www.knopper.net/knoppix/index-en.html

Have fun :)
Kent
2
Eof
2,265
Posted By kbrede
It's a little difficult understanding what you're...
It's a little difficult understanding what you're trying to do. Perhaps if you forgot the code for a bit and gave more background about the task you are trying to accomplish, it would help.

This...
3,948
Posted By kbrede
perl -p -e 's/(^.*:).*/$1 machinec/g' filename ...
perl -p -e 's/(^.*:).*/$1 machinec/g' filename

(^.*:) Everything between (), the beginning of line "^" to ":" is put into variable "$1."

Kent
4,736
Posted By kbrede
If you have perl installed, look for rename or...
If you have perl installed, look for rename or prename on your system. Use the "-n" switch to test, and then "-v" when you want to make the change.

$ rename -n 's/(.*)/$1.txt/' *
4,695
Posted By kbrede
In case there's some confusion, you probably want...
In case there's some confusion, you probably want forward slashes like:
export PATH=$PATH:/var/home/etc

Another note, /var/home/etc seems like a strange place to put executables. /etc is where...
4,505
Posted By kbrede
It's not /etc/resolve.conf it's /etc/resolv.conf...
It's not /etc/resolve.conf it's /etc/resolv.conf (in case you were looking for the wrong file). /etc/resolv.conf is used to access the DNS servers the system uses. At least on the boxes I've seen. ...
2,616
Posted By kbrede
Sorry I didn't have time to test yesterday. This...
Sorry I didn't have time to test yesterday. This should work, but a more elegant solution is probably out there.

find . -name "eCustomerCME*" -print0 | xargs -0 ls -lt | grep ^- | tail -1 | awk...
2,616
Posted By kbrede
Take a look at the xargs manpage. I'm not 100%...
Take a look at the xargs manpage. I'm not 100% sure the following will work but......

ls -ltr eCustomerCME* -print0 | xargs -0 grep ^- | tail -1 | awk ' { print $6,$7,$8 } '

Kent
4,505
Posted By kbrede
I've not been on a tru64 machine and I'm not...
I've not been on a tru64 machine and I'm not exactly sure what your question is but.....

Try -

$ hostname
$ cat /etc/hosts

Or if you know the IP address look into the host, dig or nslookup...
8,360
Posted By kbrede
In bash the return code of a prog is in $?. ...
In bash the return code of a prog is in $?. Usually exit status 0 = success and 1 = failure.

If we look in the manpage for grep we find:

Normally, exit status is 0 if selected lines are...
4,445
Posted By kbrede
A web search for "free shell access" should get...
A web search for "free shell access" should get you started.
1,752
Posted By kbrede
Usually there is some type of package management...
Usually there is some type of package management system you can use to install programs. You can also compile from source code. Let the list know what flavor of Unix you are using and someone...
1,552
Posted By kbrede
This might not be exactly what you're looking for...
This might not be exactly what you're looking for but honestly it's what got me started down the *NIX road.

http://catb.org/~esr/faqs/hacker-howto.html

Grab an free *NIX OS and start playing...
47,139
Posted By kbrede
The real problem it looks like you were facing is...
The real problem it looks like you were facing is reading "number" and then trying to pass it to the variable "$x" I've corrected that in the code below. The "-n" switch for echo doesn't terminate...
4,946
Posted By kbrede
One more..... The grep one wasn't quite what you...
One more..... The grep one wasn't quite what you were looking for.

$ perl -nle 'while(m/\|(.*)/g){print "$1"}' test.txt

Kent
4,946
Posted By kbrede
Here's another.... $ grep -o \|.*\|.* test.txt
Here's another....
$ grep -o \|.*\|.* test.txt
4,946
Posted By kbrede
Here's one way..... awk -F "|" '{print...
Here's one way.....
awk -F "|" '{print $2"|"$3}' test.txt

Kent
Showing results 1 to 18 of 18

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