• ALGEMENE VOORWAARDEN
  • GENERAL TERMS & CONDITIONS

KUDOS - IT consultant and FOSS supporter

  • home
  • contact
  • services
  • baanboard
  • msx
Home

Feed aggregator

Failure to install Linux

UNIX.com - Sun, 05/09/2010 - 06:57
I need help. My recently downloaded LINUX version won't install. Is this because of as previous OS being installed in my PC. I removed it prior to my LINUX installation and this is where problems started.

How to undo Release Outbound of transfer Order(manual)?

Baanboard.com - Sun, 05/09/2010 - 06:05
Forum: Distribution, Transportation & Warehousing Posted By: stevenlam Post Time: 2nd September 2010 at 04:31

stout, stderr to syslog via function with if statement

UNIX.com - Sun, 05/09/2010 - 04:36
I have a function called sysLogger in a bash script that I am using to redirect stdout and stderr to syslog.

Part of the script contains an option to turn on debugging otherwise I want debugging output to go to /dev/null.

I am struggling to understand how to make this work using the function I have created to take stderr and stdout and redirect it to syslog. Sending output to syslog works fine (although I am seeing file descriptor left open errors, not sure if they are a problem). But if I add an "if" statement to try and redirect any output to /dev/null depending on whether debugging is enabled I get "broken pipe" errors.

I have tried using "tee" and various other options to just redirect to /dev/null but none worked and googling about process substitution and file descriptors has made more confused than anything.

The full script and config file is attached so you can see what I am trying to do, but here is the important bits.

Function:
Code: ####### logging
sysLogger () {
        local logPriority=$1
        local logMessage=$2
        case "${logPriority}" in

                critical)      logger -p local1.notice -t mugsyback.crit ${logMessage}
                ;; 
                warning)        logger -p local1.notice -t mugsyback.warn ${logMessage}
                ;; 
                info)          logger -p local1.notice -t mugsyback.info ${logMessage}
                ;; 
                debug)          if "${logLevel}" = "debug" ; then
                                        logger -p local1.notice -t mugsyback.debug ${logMessage}
                                        else > /dev/null
                                fi 
                ;; 
                *)              echo "logging option does not exist"
                ;; 
        esac
} Once example of output being redirected (altered for purposes of this post)
Code: mount -v /mnt/backup 2> >(sysLogger "critical") 1> >(sysLogger "debug") || { backupResult=1 ; cleanup ; } I have the following in /etc/rsyslog.d/mugsyback.conf

Code: cat /etc/rsyslog.d/mugsyback.conf
# - mugsyback logging -
local1.notice                  /var/log/mugsyback.log thanks
Attached Files mugsyback.sh (12.1 KB) mugsyback.conf (1.7 KB)

Almost -> Hello World!

UNIX.com - Sun, 05/09/2010 - 03:00
Hello! I know I must take the efforts of learning C..! I need to recompile a binary with the following at the beginning: test if a file exists, remove it and exit. All in "C". As simple as this in sh:

Code: file=/tmp/filename
if [ -f $file ]; then
    rm -f $file
    exit 0
fi Thanks!

The ll command + metacharacters

UNIX.com - Sun, 05/09/2010 - 02:41
Hello. I am learning how to use Unix through an online course. Unfortunately the text that we use isn't very good, so I could use some help with a pretty basic question.

  • Use metacharacters and the ll command to list all filenames under the datafiles directory that contain a dot "." with the letter 'a' anywhere after the dot.
So far, I've figured out
  • ll datafiles \.
But I'm not sure how to look for a character after the dot. For that mater, I'm not sure how to list files containing a certain character. I know that
  • a*
will list files beginning with a, and that using brackets will list a range of characters, but neither of those is what I'm looking for.

cannot put SCO 5.0.6 in single user mode

UNIX.com - Sun, 05/09/2010 - 01:41
hi

I have SCO 5.0.6 and if I type Ctrl-D, the system will NOT enter single user mode, it goes into multi-user mode.
If I use the init 1 command, I get right back into the cycle ... an I'm at the Ctrl-D prompt again.

SQL Functions - PostgreSQL

UNIX.com - Sat, 04/09/2010 - 22:42
Hi guys.

I have some questions about SQL functions in postgresql:

1. Can a SQL function call another SQL function?
2. How about recursive calls?
3. Consider we have function that has a varchar argument.

CREATE FUNCTION func(varchar) RETURN void AS $$
some SQL queries.
$$ LANGUAGE SQL;

Should we define the argument, varchar or we should define the length too like varchar(20)? How about return values?
4. consider this example:
we have table named student and a function like this: it only gets a student row and add that row to the student table.

CREATE FUNCTION add_new(student) RETURNS void AS $$
INSERT INTO student VALUES ($1);
$$ LANGUAGE SQL;

is this function syntactically right?

Thank you very much.

Quota Managment - Virtual Users - VSFTPD

UNIX.com - Sat, 04/09/2010 - 21:41
Hi guys.

I have configured Vsftpd with virtual users using Berkley DB. it is running fine. But how can we implement disk quotas for virtual users?

which linux is best for learning unix?

UNIX.com - Sat, 04/09/2010 - 21:15
I have just installed Ubuntu because I need a linux system asap and Ubuntu seems to be easiest for that. But I plan on installing some other Linux distro's for a while (maybe on virtualBox too) so i can understand the inner workings of linux and especially more about unix. I know that alot of the stuff on ubuntu is automated for me, I would in the long run, prefer to slowly do it myself to understand everything better. I guess my main goal though, is to understand unix as much as possible, since i know even when I start working, i will be exposed to a unix environment. any ideas?

gunzip problem

UNIX.com - Sat, 04/09/2010 - 21:04
hi

On one of our SCO 5.0.6 server gunzip doesn't work and I'm getting this error message: Code: # gunzip
dynamic linker: gunzip: symbol not found: ___requires_updated_system_library_se_
Killed Code: # find / -type f -name "gunzip"
/opt/K/SKUNK2000/GZIP/1.2.4/usr/local/bin/gunzip
/opt/K/DataSystems/freeware/5.0.0a/usr/bin/gunzip Howto solve this?

How to keep process running after apache restart.

UNIX.com - Sat, 04/09/2010 - 21:03
Hi, I have a PHP application that starts a couple of processes on the server...the problem is that if I restart apache those running apps will die.

How can I start them in a way that they are not killed when I restart/stop apache ?

PHP Code:       $cmdstr = "nohup ".$config['hsp_path']."/".$config['sc_trans']." ".$config['hsp_path']."/autodjs/".$port."/".$srvname.".conf";
      $cmdstr .= " > /dev/null & echo $!";
      $pid = shell_exec($cmdstr); 
This is how I start that app.

Search & Replace question

UNIX.com - Sat, 04/09/2010 - 20:28
Hi all,

I have one question that hopefully isn't too complicated for the more advanced users here. In one of the Solaris KSH scripts I'm working on, is it possible to script the following:

- If there "is" an empty blank line "at the end" of /tmp/text.txt, then remove only that one empty blank line from the end.
- If there is "no" empty blank line at the end of /tmp/text.txt, then append an "empty blank line" to the very end of that file.

I'm having difficulty with this one, but I suspect either awk or sed may be needed?
Thank you so much,
cg

The Evolution of the Cloud Revolution ? Part 1 and 2

UNIX.com - Sat, 04/09/2010 - 20:15
by Joel Campbell and Amy Zeller Directions Magazine Technology Maturation Created the Cloud When the computing age took off in the 1960s, powerful mainframe computers ran bulk data processes inside large organizations. At that same time, several companies realized they could take advantage of these large-scale systems by selling chunks of processing time to smaller [...]

More...

abbreviation vi

UNIX.com - Sat, 04/09/2010 - 18:34
hi all,

i want to write a script using vi editor ...the problem is given below...

Set the abbreviation for “Infosys Technologies Limited” as ITL and list it.
  1. Type ITL in the insert mode and check whether the ITL is getting substituted by “Infosys Technologies Limited”
  2. Unabbreviate ITL and check it

....

Assigning the relative directory name to a variable called $DIR.

UNIX.com - Sat, 04/09/2010 - 18:27
Hi All,

I've been trying to write a KSH script that acts on the name of the relative directory that this script is called from.

In other words, if I am executing this script from a directory called:
/hello/hithere/directory

How would I assign
DIR=

to be "directory" and not "/hello/hithere/directory" ?

Thank you so much !
cg

About Apache Subversion

UNIX.com - Sat, 04/09/2010 - 17:56
Hi all,
I have a trouble with this, the web server include a website and also config as apache subversion, this server crashed and i moved the HDD to another machine, i started all the services and the subversion worked fine, but when i access to the website, this message appear A username and password are being requested by http://mywebsite. The site says: "Subversion repository" :confused:
How can i correct this problem??
Thx all,
*P/S: Sry if my english is not good :)

replacing multiple word in unix

UNIX.com - Sat, 04/09/2010 - 16:12
Dear all,

I am new to unix and i have some problem over here
Is there any way to replace few words in a text file using sed command?

Let say i want to replace "I into He" "love into hate" and "you into her"

I was trying this out but it does not seems to work

Code: sed { 's/I/He/g' ; 's/love/hate/g' ; 's/you/her' } any comment?

thank you so much in advance

snmp on solaris

UNIX.com - Sat, 04/09/2010 - 13:40
hello,

please, can any one help me to find a set of information to configure snmp in solaris 10 to send traps to manager

urgent
please

thanks

Using "apt-get install" in shell script

UNIX.com - Sat, 04/09/2010 - 12:39
Hi,

I want to install certain packages on my Ubuntu 8.04 32-bit machine. I am doing it via the following shell script.

Code: #!/bin/bash
 
while read -r pkg
do
    apt-get install --force-yes "$pkg"
    [ $? -eq 0 ] && { continue; }
done < list_of_packages.txt The problem I am facing is, I am not able to determine when the first package's installation gets over, so that I can make the second line (package) from file to be installed next following the successful installation of the previous package. How can I do that? I cannot put sleep for indefinite time after each 'apt-get install' call.

Any help would be highly appreciated.

Simply Explained: Priority Inbox

UNIX.com - Sat, 04/09/2010 - 10:15
2010-09-04T10:00:13+02:00




See TechCrunch about the Google priority inbox and IMAP.

Tweet



Source...
  • « first
  • ‹ previous
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • …
  • next ›
  • last »
Syndicate content

Navigation

  • Glossary
  • Recent posts

Search

User login

  • Request new password

Recent comments

  • reply this post
    1 week 5 days ago
  • answer
    2 weeks 1 day ago
  • On the same port
    14 weeks 1 day ago
  • All, with 2 daemons running
    17 weeks 3 days ago
  • /etc/init.d/sshd
    21 weeks 4 days ago
  • No easy way to do this
    21 weeks 5 days ago
  • external iface is dhcpd addressed
    21 weeks 5 days ago
  • Great
    23 weeks 6 days ago
  • Great!
    26 weeks 6 days ago
  • Thanks!
    28 weeks 5 days ago

Use Free Software!

Visit the Free Software Directory

Baanboard.com

  • Logname not authorised
  • Infor Tools Consultants
  • Infor Distribution Consultants
  • Tipo de Font
  • To Display details of an Order in the special menu
more

UNIX.com

  • using awk to print absolute value
  • How to write to .csv file
  • Distribution Release: Linux Mint 201009 "Debian"
  • Help on "tr' command
  • Mapping with series from master file and calculate count
more

  • home
  • contact
  • services
  • baanboard
  • msx