Tag Info

Hot answers tagged

2

It is not possible to use the same file as input and output for grep. You may consider the following alternatives: temporary file grep pattern file > tmp_file mv tmp_file file sed sed -i -n '/pattern/p' file put whole file in the variable (not bright idea for large files) x=$(cat file); echo "$x" | grep pattern > file


1

If you are not writing your own software but want to start/stop existing service, than like @jasonwryan wrote, RHEL/Fedora are using systemd. The command for handling services is systemctl. systemctl start/stop/restart servicename If you want to list the installed services, use: systemctl list-units


1

You should have check "other software". If you didn't is very likely that all those entries are there. You can also check your sources.list files in case is somewhere: grep security /etc/apt/sources.list /etc/apt/sources.list.d/* Edit your files with your favorite editor using root.


1

It gives error because you provide only one input number, not two. In such case read assigns this number to variable x, but y will stay empty, so next line looks like echo $(($x + )). As we know operator + takes two operands, but here y (the second one) is missing, thus the error operand expected (error token is “+ ”).


1

The service servicename needs a user from Active Directory using PBIS (formerly Likewise Open). By the way, PBIS stands for PowerBroker Identity Services. So the PBIS service has to be fully up. After that the service can start with that user. If Jenkins's init script is the very last one, it worked. NOTE: So, be careful when services depend on other ...


1

I do the same and because I rebuild my tool drive (added/removed/updated tools/ISOs) quite often, I'm using (http://www.pendrivelinux.com/yumi-multiboot-usb-creator/YUMI (Your Universal Multiboot Integrator)) It allows you to add/remove various distro's and tools to a usb flash drive. It's rather easy. The result will look something like this on boot: No ...


1

I don't know what you mean by "next available" with respect to the $HOME and $SHELL variables. Those you just set to their defaults: /home/USERNAME and /bin/bash or whatever. For the $HOME, just make sure the directory does not exist ([ -e "/home/$username" ] && echo "Directory exists"). As for the groups, just list the available groups and take ...



Only top voted, non community-wiki answers of a minimum length are eligible