I am trying to cat a file and then grep that file for a number. I can do it fine on other files but this particular file will not do anything. I tried running it on an older file from the same device but it is just not working. The file is nothing more than a flat file on a unix box. Here is just a... (3 Replies)
Hi,
This is what I am trying to do.
1) connect to 3 remote servers from my local machine
serverA serverB serverC
2) read error file from each server
cat /var/lib/mysql/mydb.err
3) grep for lines displaying "yesterday" date
grep "`date +%y%m%d' '-d\"1 day ago\"`"
4) Append those lines to a... (7 Replies)
Hi All,
Why does these list (below) doesn't belong to /etc/shells?
sync:x:5:0:********************// :/sbin:/bin/sync
shutdown:x:6:0:********************// :/sbin:/sbin/shutdown
halt:x:7:0:********************// :/sbin:/sbin/halt
webalizer:x:68:68:***************// ... (2 Replies)
I am not sure if using cat -n is the most efficient way to split a file into multiple files, one file per line in the source file.
I thought using cat -n would make it easy to process the file because it produces an output that numbers each line that I could then grep for with the regex "^ *$i".... (3 Replies)
Is there a way using grep or cat a file to create a new file based on whether the first 9 positions of each record is less than 399999999?
This is a fixed file format. (3 Replies)
Hi,
I still have the problem with directing information from cat or grep to a variable.
For instance:
XMSG "$(date +%Y_%m_%d)_error_report.txt" "$(cat "$(date +%Y_%m_%d)_error_report.txt")" &Works! The text received by cat is directed to my function.
If it is written like this, my... (2 Replies)
Hello,
i need to search one word (snp1) from many files and copy the content of the columns of this word in new file.
example:
file 1:
SNP BP CHR P
snp1 1 3 0.01
snp2 2 2 0.05
.
.
file 2:
SNP BP CHR P
snp1 1 3 0.06
snp2 2 2 0.3
output... (6 Replies)
Hello
someone told me to use
OS=`awk '{print int($3)}' < /etc/redhat-release`
instead of
OS=cat /etc/redhat-release | `awk '{print int($3)}'`
any idea for the reason ? (5 Replies)
Hi Guys
This is my first post so I am not sure how things go here. I'm sorry if I'm breaking the rule or something. Feel free to correct me about that :)
So as I was saying...
I'd been trying to grep this folder containing 900,000 txt files but seems no luck. I get either "No such file... (6 Replies)
Discussion started by: Nexeu
6 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)