the path entered by the user is supposed to be something like "$ABCD/defef/geft.txt" and i want to check if anything out of "$ABCD/defef/geft.txt" is mistyped. The script should exit.
and if, only $ABCD or defef or gef.txt is entered by the user, still script should exit.
i tried this
please suggest where i am mistaken...
Last edited by Rashid Khan; 03-08-2013 at 03:45 AM..
Reason: Please use code tags for data and code samples
Hi,
how to do that ? I mean only print it but not execute. I'm using putty to interact with ksh.
(in windows cmd up arrow does the job)
thanks
vilius (5 Replies)
Hello,
I have the following report (report.txt) file (see attached).
I would like to check the file and if the field is error, then showing error message at output.
1. In the report, 1st, 2st and 3nd line can be ignore to check
2. start to check line 4 (each field use "," to split
- 1st... (1 Reply)
Hi All,
I am new to unix scripting, please help me in completing this exercise,
I have a scenario as follows,
1. i have a text file(snapshot.txt) consisting of directory names, and file
size separated by comma as shown below:
snapshot.txt data:
... (1 Reply)
I am trying to write a shell script that will allow the typing of a value, then using that value to replace data in a text file.
I suspect I need sed.
The format of the file is:
Variable1:Value1
Variable2:Value2
The interaction would be something like:
Shell Prompt: "Please enter the... (9 Replies)
I have a netscape 4.79 browser for our GUI which connects to a Solaris5.8 box. During peek hours, we see question marks appearing in the screen instead of the text we enter. This results in query failure. This problem does not happen always, and is quite irritating because, we have to close the... (6 Replies)
ok the user can only enter a number if a letter is entered it shouldnt be accepted
This is what i have so far
read -p "How many cars to enter:" cars
until
do
read -p "Invalid number. Please re-enter:" $tags
done (5 Replies)
Hello
Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Hi Experts,
path=/db/files/
format=$1
User can enter any file format.compare the user file format with actual file format existed in the directory /db/files. User enter all characters as "A" apart from date format.
example1: user will be entering the file format AAA_AA_YYYYMMDD.AAA
Actual... (6 Replies)
Hello,
I'm looking to check only the first line of a file to see if it is a format string, like
# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string.
I'd... (3 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT OSF1
addgroup
addgroup(8) System Manager's Manual addgroup(8)NAME
addgroup - Adds a new group interactively
SYNOPSIS
/usr/sbin/addgroup
DESCRIPTION
Security Note
If you have enhanced security installed on your system, you should use the dxaccounts program to add a group. See Security and the dxac-
counts(8) reference page for more information.
The addgroup command is an interactive program for adding new groups to the /etc/group file. The program prompts you for specific informa-
tion and informs you of its activity and error conditions.
Only the superuser can execute this command.
The program performs the following tasks: Queries for a new group name. The default can be chosen by pressing the Return key, which will
cause the program to exit without adding a new group. Enter the new group name, 8 characters or less, or Return to exit. If the new group
entered already exists in the /etc/group file, the program informs you of this and cycles back to the query for a new group name. If the
new group entered does not already exist, the program continues. Queries for a group number (GID) for the new group. A default GID, which
is based on previously existing GID's in the /etc/group file, is displayed and can be selected by pressing the Return key. Enter a new GID
or accept the default. If the new GID entered already exists in the /etc/group file, the program informs you of this and cycles back to
the query for a new group number (GID). If the new GID entered does not already exist in the /etc/group file, the program uses this GID
and adds the new group to the /etc/group file.
At this point, the program ends.
This interface has been superseded by the groupadd command-line interface, and the Account Manager (dxaccounts) graphical user interface.
RESTRICTIONS
The group name is limited to eight characters.
EXAMPLES
Enter a new group name or <Return> to exit: newgroup Enter a new group number [112]:
FILES
Specifies the command path. Group file Lock file
SEE ALSO
Commands: adduser(8), dxaccounts(8), groupadd(8), removeuser(8)
Files: group(4)addgroup(8)