Sponsored Content
Top Forums Shell Programming and Scripting Writing a script on creating and comparing users Post 302886270 by RudiC on Thursday 30th of January 2014 11:10:38 AM
Old 01-30-2014
Questions on this topic are quite frequently asked in these fora. Did you do an intensive search?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with shell script - creating users

echo -e "Enter in a username : \c" read username grep "^$username:" /etc/passwdWhat I'm trying to do is take in a username from my script and I need to be able to check if that username already exists. If it does the script should display a message saying that the user already exists and exit. ... (2 Replies)
Discussion started by: shadowcat
2 Replies

2. BSD

Creating an array out of users: shell script

I want to create a shell script for a menu selection consisting of users defined on the machine. To an administrator having the privileges, the selection menu will look as follows: Select the user you want to define the variables for: 1) my-username-1 2) my-username-2 etc Then there would be a... (7 Replies)
Discussion started by: figaro
7 Replies

3. Shell Programming and Scripting

Script in bash wchich creating a new users...

Hi, I am a new on this forum but i like :) I need a script in bash which will be crating a new user with folder for websites. For example: I will run this program and he creating a new user(with my name) and folder whcich name like user and if i will localho/~user in browser, she show me files from... (1 Reply)
Discussion started by: puclavv
1 Replies

4. Shell Programming and Scripting

Comparing two files and creating a new file

Hi, I want to compare two files based on the data in their first column. Both the files are not equal in their number of columns and number of entries or rows. The entries (only the first column) of the file1 should be compared with the entries (only the first column) of the file2. If the... (3 Replies)
Discussion started by: begin_shell
3 Replies

5. Shell Programming and Scripting

Comparing Columns and writing a new file

I have a table with one column File1.txt 1 2 3 4 5 6 7 8 9 10 Another table with two columns; This has got a subset of entries from File 1 but not unique because they have differing values in col 2. File2.txt 1 a 2 d 2 f 6 r 6 e (3 Replies)
Discussion started by: cs_novice
3 Replies

6. UNIX for Dummies Questions & Answers

Script for creating users

Hi, I wants to create the users for multiple machine from single main server using the shell script ,can you please help me on this.... (2 Replies)
Discussion started by: Rahulne25
2 Replies

7. Shell Programming and Scripting

Creating new users using a text file as imput (using only shell script and/or awk)

I need somebody who could help with an exercise. You have a text file called users.txt with this info inside: users.txt: user1:1234:/home/homedir1 ; user2:1234:/home/homedir2 ; user3:1234:/home/homedir3 ; user4:1234:/home/homedir4 ; The script should create an user using the... (2 Replies)
Discussion started by: marcosruiz
2 Replies

8. Red Hat

Script for Creating more users like 50 in one server

Hi friends could you please share me the script to create more users in one server except newusers, is there any option to change secondary group and how to print passwd and changing the age all these things how can i edit in newsers.. please help me (0 Replies)
Discussion started by: indiankrish
0 Replies

9. Shell Programming and Scripting

Shell script for creating multiple users with password

for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ; PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ; echo "$PassWord@123" | passwd $UserName --stdin ; done can some one explain what the bold text do Please use... (5 Replies)
Discussion started by: James0806
5 Replies

10. HP-UX

Creating a group of users with script

Hi, I have a file with usernames, and the comment section, e.g : Data removed by request of sanchitadutta91, 20 May 2020 I need to add these users into a server. Is it possible to use a script to create the users, together with the comment ? From the commandline to add one user, the... (2 Replies)
Discussion started by: anaigini45
2 Replies
GIT-RERERE(1)							    Git Manual							     GIT-RERERE(1)

NAME
git-rerere - Reuse recorded resolution of conflicted merges SYNOPSIS
git rerere [clear|diff|status|gc] DESCRIPTION
In a workflow employing relatively long lived topic branches, the developer sometimes needs to resolve the same conflicts over and over again until the topic branches are done (either merged to the "release" branch, or sent out and accepted upstream). This command assists the developer in this process by recording conflicted automerge results and corresponding hand resolve results on the initial manual merge, and applying previously recorded hand resolutions to their corresponding automerge results. Note You need to set the configuration variable rerere.enabled in order to enable this command. COMMANDS
Normally, git rerere is run without arguments or user-intervention. However, it has several commands that allow it to interact with its working state. clear This resets the metadata used by rerere if a merge resolution is to be aborted. Calling git am [--skip|--abort] or git rebase [--skip|--abort] will automatically invoke this command. diff This displays diffs for the current state of the resolution. It is useful for tracking what has changed while the user is resolving conflicts. Additional arguments are passed directly to the system diff command installed in PATH. status Like diff, but this only prints the filenames that will be tracked for resolutions. gc This prunes records of conflicted merges that occurred a long time ago. By default, unresolved conflicts older than 15 days and resolved conflicts older than 60 days are pruned. These defaults are controlled via the gc.rerereunresolved and gc.rerereresolved configuration variables respectively. DISCUSSION
When your topic branch modifies an overlapping area that your master branch (or upstream) touched since your topic branch forked from it, you may want to test it with the latest master, even before your topic branch is ready to be pushed upstream: .ft C o---*---o topic / o---o---o---*---o---o master .ft For such a test, you need to merge master and topic somehow. One way to do it is to pull master into the topic branch: .ft C $ git checkout topic $ git merge master o---*---o---+ topic / / o---o---o---*---o---o master .ft The commits marked with * touch the same area in the same file; you need to resolve the conflicts when creating the commit marked with {plus}. Then you can test the result to make sure your work-in-progress still works with what is in the latest master. After this test merge, there are two ways to continue your work on the topic. The easiest is to build on top of the test merge commit {plus}, and when your work in the topic branch is finally ready, pull the topic branch into master, and/or ask the upstream to pull from you. By that time, however, the master or the upstream might have been advanced since the test merge {plus}, in which case the final commit graph would look like this: .ft C $ git checkout topic $ git merge master $ ... work on both topic and master branches $ git checkout master $ git merge topic o---*---o---+---o---o topic / / o---o---o---*---o---o---o---o---+ master .ft When your topic branch is long-lived, however, your topic branch would end up having many such "Merge from master" commits on it, which would unnecessarily clutter the development history. Readers of the Linux kernel mailing list may remember that Linus complained about such too frequent test merges when a subsystem maintainer asked to pull from a branch full of "useless merges". As an alternative, to keep the topic branch clean of test merges, you could blow away the test merge, and keep building on top of the tip before the test merge: .ft C $ git checkout topic $ git merge master $ git reset --hard HEAD^ ;# rewind the test merge $ ... work on both topic and master branches $ git checkout master $ git merge topic o---*---o-------o---o topic / o---o---o---*---o---o---o---o---+ master .ft This would leave only one merge commit when your topic branch is finally ready and merged into the master branch. This merge would require you to resolve the conflict, introduced by the commits marked with *. However, this conflict is often the same conflict you resolved when you created the test merge you blew away. git rerere helps you resolve this final conflicted merge using the information from your earlier hand resolve. Running the git rerere command immediately after a conflicted automerge records the conflicted working tree files, with the usual conflict markers <<<<<<<, =======, and >>>>>>> in them. Later, after you are done resolving the conflicts, running git rerere again will record the resolved state of these files. Suppose you did this when you created the test merge of master into the topic branch. Next time, after seeing the same conflicted automerge, running git rerere will perform a three-way merge between the earlier conflicted automerge, the earlier manual resolution, and the current conflicted automerge. If this three-way merge resolves cleanly, the result is written out to your working tree file, so you do not have to manually resolve it. Note that git rerere leaves the index file alone, so you still need to do the final sanity checks with git diff (or git diff -c) and git add when you are satisfied. As a convenience measure, git merge automatically invokes git rerere upon exiting with a failed automerge and git rerere records the hand resolve when it is a new conflict, or reuses the earlier hand resolve when it is not. git commit also invokes git rerere when committing a merge result. What this means is that you do not have to do anything special yourself (besides enabling the rerere.enabled config variable). In our example, when you do the test merge, the manual resolution is recorded, and it will be reused when you do the actual merge later with the updated master and topic branch, as long as the recorded resolution is still applicable. The information git rerere records is also used when running git rebase. After blowing away the test merge and continuing development on the topic branch: .ft C o---*---o-------o---o topic / o---o---o---*---o---o---o---o master $ git rebase master topic o---*---o-------o---o topic / o---o---o---*---o---o---o---o master .ft you could run git rebase master topic, to bring yourself up-to-date before your topic is ready to be sent upstream. This would result in falling back to a three-way merge, and it would conflict the same way as the test merge you resolved earlier. git rerere will be run by git rebase to help you resolve this conflict. AUTHOR
Written by Junio C Hamano <gitster@pobox.com[1]> GIT
Part of the git(1) suite NOTES
1. gitster@pobox.com mailto:gitster@pobox.com Git 1.7.1 07/05/2010 GIT-RERERE(1)
All times are GMT -4. The time now is 07:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy