No offense but I was not aware that you are totally new to shell scripting. You can add a > symobol at the very end of the awk line so that it will be redirected into a filename like for example:
I guess it will be very good for you to read up a bit more of shell scripting in general since you will need it to put the puzzle together anyway.
On the standard ftp supplied with Solaris and HP-UX is there anyone that has been able to disable users from certain settings.
i.e the put function.
Our customer ftp's onto the unix host and gets files for extraction into a pc based spreadsheet. I want to stop them from being able to delete... (1 Reply)
A program named /usr/bin/aa.sh, two parameters: 11, 22. after start it, the row in `ps -ef` is almost like the following:
root 12198 10278 0.0 Nov 25 pts/3 0:00.23 /usr/bin/aa.sh 11 22
but I want to change "/usr/bin/aa.sh 11 22" to one rule string, such as: "AA_11_22", how to... (1 Reply)
Hello,
I want to write a ksh script about changing UID and changing group with GID. There are multiple servers i want to perform that job.
linux1
linux2
linux3
linux4
linux5 ......
.
.
.
.
.
1.) How can i enter "password" in script rather asking me?
I was trying this...
ssh... (2 Replies)
Hello:
I am using csh, and am a complete noob when it comes to shell scripting.
I want the following:
1) Ignore case when doing auto-complete.
2) If there are multiple matches (example: I have files abc.txt abc.txt.1, abc.txt.2 and type abc<tab>), count the number of matches.
If... (1 Reply)
In my .profile, my prompt is set like this:
set -o vi
PS1=`logname`@`hostname -s`:'$PWD>'
Is there a way to show what the history number would be of the command I'm typing in the prompt? For example, I frequently run commands then run 'history' to pull up the history number of a command... (2 Replies)
I have an rsync command that I want to create a variable where user can change to customize the parameters.
complete rsync command to run:
$RSYNC -e 'ssh -ax -o ClearAllForwardings=yes' --log-file=$LOG_FILE --delete -avzcr -u --update $SRC_DIR $USER@$TRG_SRV:$TRG_DIR >> $LOG_FILE
What I... (4 Replies)
hi
I am trying to make my own commands in my linux.I thought a command for changing directories will be easy.
I made a simple file amd made the entries
#!/bin/bash
cd /opt/mydir
I then made the file executable and then moved it to /usr/bin.
But when i type the script name nothing... (2 Replies)
I have a jump off server, which grants SSH access to a few other servers.
I would like to create a custom shell which can be assigned to specific user accounts which runs a menu script upon login, where they can select which server they want to jump too, however should they hit ctrl-c or any... (1 Reply)
Hi All,
Am getting the raw report from the source and need to prepare the custom report as per the requirement.
Requirement keep getting change according to the need.
Raw data is as below
/* ----------------- test_job_hu ----------------- */
insert_job: test_job_hu job_type: CMD... (4 Replies)
Discussion started by: pradeep84in
4 Replies
LEARN ABOUT DEBIAN
chsh
CHSH(1) User Commands CHSH(1)NAME
chsh - change login shell
SYNOPSIS
chsh [options] [LOGIN]
DESCRIPTION
The chsh command changes the user login shell. This determines the name of the user's initial login command. A normal user may only change
the login shell for her own account; the superuser may change the login shell for any account.
OPTIONS
The options which apply to the chsh command are:
-h, --help
Display help message and exit.
-R, --root CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.
-s, --shell SHELL
The name of the user's new login shell. Setting this field to blank causes the system to select the default login shell.
If the -s option is not selected, chsh operates in an interactive fashion, prompting the user with the current login shell. Enter the new
value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of [ ] marks.
NOTE
The only restriction placed on the login shell is that the command name must be listed in /etc/shells, unless the invoker is the superuser,
and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing /bin/rsh
in /etc/shells is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell
back to its original value.
FILES
/etc/passwd
User account information.
/etc/shells
List of valid login shells.
/etc/login.defs
Shadow password suite configuration.
SEE ALSO chfn(1), login.defs(5), passwd(5).
shadow-utils 4.1.5.1 05/25/2012 CHSH(1)