Search this Website

 

Ubuntu

UNIX

batch id in unix

Category: UNIX-Unix Beginner

batch id in unix

hi can any one help me?
how to find the "batchid" in unix?

regards,
ganapati.


Read More...

problems with simultaneous access to a server

Category: UNIX-Unix Beginner

problems with simultaneous access to a server

hello,

i'm working in a project where several procedures are programmed using unix scripts.

one of these scripts is launched in several threads. when performing these threads an scp command to another server it gives out. this error happens only sometimes, others not and each time for a different amount of threads. it seems to be a problem wih simultaneous connections to the same server as the scp is performes more or less at the same time for all threads. does anybody know how to check the number of simultaneous connections allowed in a unix server?

thanks and best regards,


Read More...

hello everyone - student in need of help

Category: UNIX-Unix Beginner

hello everyone - student in need of help

hi everyone.

let me just start off by saying i'm a college student and i love playing around with unix.

i registered here because i have a unix shell scripting class and i am having some issues with my homework. i'm not looking for answers to the problems, just some help to get me on my way.

here is an example of one of the problems i'm having an issue with.

quote:
write a shell script called suffix that will do the following:

1. insert a reference to the bourne shell as the command interpreter of this shell script.
2. add the appropriate comments
3. test that exactly two command line argruments are enter from the command line. if not, display the usage message and stop the script and set the status to 1. if exactly two are entered, continue processing.
4. the first argument is the name of an existing file. the second agrument is a suffix to be added to the file when you rename it.
5. rename the first file to the second file name with the suffix append on.
6. cut and paste you program in the space provided along with a session of the samples being executed.

for example,

$ suffix memo1 .sv

should rename the file called memo1 to a file called memo1.sv

========

$ suffix memo1

usage: suffix filename suffixname

========

$ suffix memo1 memo2 .sv

usage: suffix filename suffixname

my main issue is that i don't know the syntax to cut and paste and redirect the output in such a way that it renames the file and everything.

if you guys can help me with the commands i'll need to make this script, i would greatly appreciate it.


Read More...

postfix problem under mailxsendmail command

Category: UNIX-Unix Beginner


Read More...

how to display first 7 char of grep results

Category: UNIX-Unix Beginner

how to display first 7 char of grep results?

my file contains the following:

uat2000.aspclient.active=true
uat2001.aspclient.active=true
uat2002.aspclient.active=true
uat2003.aspclient.active=true
uat2004.aspclient.active=false
uat2005.aspclient.active=false
uat2006.aspclient.active=false
uat2007.aspclient.active=false
uat2008.aspclient.active=false
uat2009.aspclient.active=false

i am greping which ones = true with
# cat filename | grep active=true

results:

uat2000.aspclient.active=true
uat2001.aspclient.active=true
uat2002.aspclient.active=true
uat2003.aspclient.active=true

question: i want the results to display only the first 7 characters, ie uat2000, uat2001, etc - how do i do that?


Read More...

crontab disappeared

Category: UNIX-Unix Beginner

crontab disappeared

when i am doing the crontab editing i am using the setenv editor /usr/bin/vi
but their was an error i tried to put set editor /usr/bin/vi and it wnet through and i started editing using the command crontab -e but somehow it is slow and displayed something like e300 and i tried to stop because it was slow,by control c and what happened was the next time i display the crontab using crontab -l everything disappeared.

i tried to check the log files for cron then i can see the the cron is running where the cronjobs is activate to the last date i am checking the cron logs.


Read More...

ls command for listing the number of files

Category: UNIX-Unix Beginner

ls command for listing the number of files

i've searched the man page for an option for the ls command to print the number of files in a directory. i'm moving files and folders around and thought a count of files would be a quick way to determine if i was missed one somewhere. some "unix's" shells do this i think... maybe linux...

anybody know how to do this real quick

system is: sunos 5.10 generic sun4u sparc sunw,ultra-5_10 ksh

i did this but is comes back with byte count rather than a file count.
ls -l |wc

thanks all )


Read More...

chmod - pass a filelist as a parameter

Category: UNIX-Unix Beginner

chmod - pass a filelist as a parameter?

hi

i have a text file which contains a list of file names (one file name per line). i would like to pass the contents of this file into chmod to change the permissions. i am having trouble getting the correct syntax for this. can someone please tell me if its possible to do this?


Read More...

do commands depending on the comparision

Category: UNIX-Unix Beginner

do commands depending on the comparision

dear all,

i am writing a shell, that do commands if the file count reaches 96. i wrote a shell, but doesn't work

code:

#!/bin/sh
min_file_count=96;
get_path=/home/collection/data1; export get_path

files_count=`ls $dirname | wc -l`

if [ $files_count > $min_file_count ] then
echo "commands listed here"
fi

test.sh: line 9: syntax error near unexpected token `fi'
test.sh: line 9: `fi'


Read More...

etcsecurityuser file in aix

Category: UNIX-Unix Beginner


Read More...