Sponsored Content
Top Forums Programming Shell script - if statements dont work Post 302987160 by rbatte1 on Tuesday 6th of December 2016 07:41:11 AM
Old 12-06-2016
I regret I cannot open that link - office internet access restriction. Can you post the content as text in CODE tags?



Robin
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

OS X / fsck / apps dont work no control panel

Alright. My neighbor kid brings me his iBook and says nothing works. He decided to move the file system to his likeness and that semed to create the problems. Now he doesn't have access rights to his home. I have run fsck over and over again and I keep getting ** fs modified ** I have also... (0 Replies)
Discussion started by: maxwell
0 Replies

2. Shell Programming and Scripting

Running remote shell script containing sql statements

I have a shell script which resides on three SCO machines containing some simple sqlplus statments. I need to run these scripts remotely. Currently, I am trying to use rsh to do so: rsh hostname myscript args The problem is that the arguments to the sqlplus statements in the remote shell... (4 Replies)
Discussion started by: Madbreaks
4 Replies

3. UNIX for Advanced & Expert Users

why the date format dont work in crontab

Hi I tried to put a cron job which pipes the logfile appended to date +%d but it didnt work . anyone know how to make this happen thanks in advance -prasad (7 Replies)
Discussion started by: p4cldba
7 Replies

4. Shell Programming and Scripting

if [ -z echo foo | egrep -e 'regexp' != '' ] -> dont work

Hallo, I need to test a String (a special ip number-string). So I want to run that: ipadress=172.0.0.0 # for debugging: echo $ipadress | egrep -e '172\.?\.??\.??$' # the test that doesnt work if test -z `echo $ipadress | egrep -e '172\.?\.??\.??$'` != "" then echo "match" else... (1 Reply)
Discussion started by: wiseguy
1 Replies

5. Shell Programming and Scripting

Looping through a shell script with sql statements

Hello members, I'm working on the Solaris environment and the DB i'm using is Oracle 10g. Skeleton of what I'm attempting; Write a ksh script to perform the following. I have no idea how to include my sql query within a shell script and loop through the statements. Have therefore given a... (4 Replies)
Discussion started by: novice82
4 Replies

6. Shell Programming and Scripting

Substitution in a file dont work with an Array in filename

Hi. I´ve a script that should substitude the 8th line in a file called xxx.num6. The "xxx" is set by an array filled with this command: j=0 for Par in *.sys ; do Par=`echo $Par | sed 's/\(.*\).sys/\1/'` ; Par2="$Par" ; echo "${Par2}" j=$((j + 1)); done Now i try... (0 Replies)
Discussion started by: Lock3
0 Replies

7. UNIX for Dummies Questions & Answers

keyboard and mouse dont work after sometime from boot in linux.

when i started booting linux ,after sometime both the mouse and the keyboard are getting freeze and wont respond(also the system gets hanged and all the process running dont go forward) ,nothing seem to work. Keeping in mind that it will work after sometime ,i waited for one hour also ,but... (1 Reply)
Discussion started by: sanjay.login
1 Replies

8. Shell Programming and Scripting

Can we use two shebang statements in a single shell script?

Hi, As per my understanding, we can use two shebang statements in a single shell script. Please see below snippet- #!/bin/bash .......## some code A #!/bin/csh .......## some code B exit 0; Here, code A will be executed using bash shell and code B will be executed with c shell. ... (9 Replies)
Discussion started by: tarunmudgal4u
9 Replies

9. Programming

Breakpoints dont work in Codeblocks, code does not build

Hey so I've written a program and it crashes every time I run it. I tried placing breakpoints to see what was going but to my surprise they do not work! I've placed them anywhere and they do not stop the execution of the program. In fact if I add code and hit rebuild it doesn't even build that... (1 Reply)
Discussion started by: Cambria
1 Replies

10. Shell Programming and Scripting

Dont want to mention user id passwd in shell script

Hi, i have one shell script which transfers files from one server to other server through FTP, but i can see login id and password is not mentioned. kindly help to understand the script.then how below script is working if login and password is not mentioned in script #!/bin/sh... (1 Reply)
Discussion started by: ni3b007
1 Replies
chfn(1) 						      General Commands Manual							   chfn(1)

NAME
chfn - change finger information SYNOPSIS
chfn [-D binddn] [-P path] [-f name] [-o office] [-p phone] [-h home_phone] [-m other] [-r service] [-q] [-u] [-v] [user] DESCRIPTION
chfn is used to change the user finger information. This are the users fullname, office room number, office phone number and home phone number. This information is stored in the /etc/passwd file and typically printed by finger(1) and similiar programs. A normal user may only change the fields for their own account, the super user may change the fields for any account. Also, only the super user may use the -o option to change the undefined portions of the GECOS field. If no information is given on the command line, chfn operates in an interactive fashion, prompting the user for each field. Enter the new value to change the field, or leave the line blank to use the current value. Enter none or a blank only to remove the current value. The current value is displayed between a pair of [ ] marks. The only restrictions placed on the contents of the fields is that no control characters may be present, nor any of comma, colon, or equal sign. The other field does not have this restriction, and is used to store accounting information used by other applications. This version of chfn is able to change the shell of local, NIS, NIS+ and LDAP accounts, if the permissions allow it. OPTIONS
-D, --binddn binddn Use the Distinguished Name binddn to bind to the LDAP directory. The user will be prompted for a password for simple authentica- tion. -P, --path path The passwd and shadow files are located below the specified directory path. chfn will use this files, not /etc/passwd and /etc/shadow. This is useful for example on NIS master servers, where you do not want to give all users in the NIS database auto- matic access to your NIS server and the NIS map is build from special files. -f, --full-name Specify your real name. -o, --office Specify your office room number. -p, --phone Specify your office phone number. -h, --home-phone Specify your home phone number. -m, --other Specify the undefined portions of the GECOS field. -r, --service Specify the service where the GECOS field should be changed. Supported services are files, ldap, nis and nisplus. -q, --quite Don't be verbose. -u, --usage Print a usage message and exit. --help Print a more verbose help text and exit. -v, --version Print version information and exit. ENVIRONMENT
SHADOW_CHFN - If this environment variable is set to 1, the chfn options are compatible to the version from the shadow suite. FILES
/etc/passwd - user account information SEE ALSO
chsh(1), finger(1), passwd(5) AUTHOR
Thorsten Kukuk <kukuk@suse.de> pwdutils February 2004 chfn(1)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy