Sponsored Content
Top Forums Shell Programming and Scripting Question related to bash. Your help needed. Post 302981612 by protos27 on Thursday 15th of September 2016 05:25:33 PM
Old 09-15-2016
Code:
#!/bin/bash  while read LINE do   
echo useradd "$LINE" -d /home/$LINE
useradd "$LINE" -d /home/$LINE
 done < $1

Will work properly. Thanks, but what when i want to put "load" data from data.txt instad of keyword like LIKE???? I mean for example for $i in "here i will put name of the file etc" is that possible? or similar way like i did it within first post?

When it comes to Corona's version

Code:
while read LINE do         
echo useradd "$LINE" -d /home/$LINE
useradd "$LINE" -d /home/$LINE
 done < data.txt

Also works properly. Thank both of You!
 

10 More Discussions You Might Find Interesting

1. Programming

signals related question

Hi all, Just a little question relative to signals. I know that if an application is in the sleep state, When a signal is catched, it will be processed by the handler. But what happens if it's processing something? Does the processing stops?? The following code should illustrate this case ... (2 Replies)
Discussion started by: ninjanesto
2 Replies

2. UNIX for Advanced & Expert Users

One Question related to alias

Hello, I have created following alias in csh lab 'rlogin -l user23 complab23' but problem is complab23 does not allow automatic login by checking .rhosts file. So after typing lab on command line I have to type complicate password and if wrong password is typed thrice then account gets... (4 Replies)
Discussion started by: neerajrathi2
4 Replies

3. Solaris

RBAC related question.....

I am referring Bill Calkins(SCSA exam prep) for RBAC..actually i wanted to make a normal user to get the privilege to run a command through authorization, not through profile files... This is the exact steps given by Bill calkins.. 1.roleadd -m -d /export/home/adminusr -c... (11 Replies)
Discussion started by: saagar
11 Replies

4. UNIX for Dummies Questions & Answers

SSI related Unix In (link) support needed

I have multiple web sites and have SSI all working fine! but I want a script that allows me to place a SSI script (or .html) on any web site within my server - One problem, SSI is limited to files located within the file structure - I want to access a file outside, (but still on my server) I found... (1 Reply)
Discussion started by: johnzule
1 Replies

5. Shell Programming and Scripting

having df command related question

Hi All, When i have run the below command its showing 90% which is critical for production. for this i need the answer of some below question please help me for that. 1) i want to delete some unwanted files. how can i know the unwanted files ?Is it there any way of knowing this?? 2)and... (2 Replies)
Discussion started by: aish11
2 Replies

6. Shell Programming and Scripting

awk related question

awk "/^<Mar 31, 2012 : /,0" /app/blah.log can someone please help me figure out why the above command isn't pulling anything out from the log? basically, i want it to pull out all records, from the very first line that starts with the date "Mar 31, 2012" and that also has a time immediately... (4 Replies)
Discussion started by: SkySmart
4 Replies

7. UNIX for Dummies Questions & Answers

Question related to 'ps'

If I run a script called 'abc.sh' and then execute the following : ps -ef | grep 'abc.sh' I always get two rows of output, one for the executing script, and the other for the grep command that I have triggered after the pipe. Questions: Why does the second row turn up in the results. My... (10 Replies)
Discussion started by: jawsnnn
10 Replies

8. Shell Programming and Scripting

Idea needed regarding process related script

I want to write a script which will take two time as input parameters and display the details of running processes between the two times, any ideas about the script ? (6 Replies)
Discussion started by: sandip250382
6 Replies

9. Shell Programming and Scripting

awk related question

awk -F ";" 'FNR==NR{a=$1;next} ($2 in a)' server.list datafile | while read line do echo ${line} done when i run the above, i get this: 1 SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net .... instead of: SERVICE NOTIFICATION: nagiosadmin skysmart-01.sky.net .... can... (4 Replies)
Discussion started by: SkySmart
4 Replies

10. UNIX for Dummies Questions & Answers

Bash with problems related to files

Hi unix people, i'm really a newbie and i've created a small bash to process some picture with ImageMagick. I have just some issue and i think this script, if we can help me to correct in right way, could be useful! Basically i have a Eyefi Card who puts files into a folder called "picture"... (1 Reply)
Discussion started by: riccardo
1 Replies
KERNEL-COMMAND-LINE(7)						kernel-command-line					    KERNEL-COMMAND-LINE(7)

NAME
kernel-command-line - Kernel command line parameters SYNOPSIS
/proc/cmdline DESCRIPTION
The kernel, the initial RAM disk (initrd) and basic userspace functionality may be configured at boot via kernel command line arguments. For command line parameters understood by the kernel, please see kernel-parameters.txt[1] and bootparam(7). For command line parameters understood by the initial RAM disk, please see dracut.cmdline(7), or the documentation of the specific initrd implementation of your installation. CORE OS COMMAND LINE ARGUMENTS
systemd.unit=, rd.systemd.unit=, systemd.dump_core=, systemd.crash_shell=, systemd.crash_chvt=, systemd.confirm_spawn=, systemd.show_status=, systemd.log_target=, systemd.log_level=, systemd.log_color=, systemd.log_location=, systemd.default_standard_output=, systemd.default_standard_error=, systemd.setenv= Parameters understood by the system and service manager to control system behavior. For details, see systemd(1). quiet Parameter understood by both the kernel and the system and service manager to control console log verbosity. For details, see systemd(1). debug Parameter understood by both the kernel and the system and service manager to control console log verbosity. For details, see systemd(1). -b, emergency, single, s, S, 1, 2, 3, 4, 5 Parameters understood by the system and service manager, as compatibility options. For details, see systemd(1). locale.LANG=, locale.LANGUAGE=, locale.LC_CTYPE=, locale.LC_NUMERIC=, locale.LC_TIME=, locale.LC_COLLATE=, locale.LC_MONETARY=, locale.LC_MESSAGES=, locale.LC_PAPER=, locale.LC_NAME=, locale.LC_ADDRESS=, locale.LC_TELEPHONE=, locale.LC_MEASUREMENT=, locale.LC_IDENTIFICATION= Parameters understood by the system and service manager to control locale and language settings. For details, see systemd(1). fsck.mode= Parameter understood by the file system checker services. For details, see systemd-fsck@.service(8). quotacheck.mode= Parameter understood by the file quota checker service. For details, see systemd-quotacheck.service(8). systemd.journald.forward_to_syslog=, systemd.journald.forward_to_kmsg=, systemd.journald.forward_to_console= Parameters understood by the journal service. For details, see systemd-journald.service(8). vconsole.keymap=, vconsole.keymap.toggle=, vconsole.font=, vconsole.font.map=, vconsole.font.unimap= Parameters understood by the virtual console setup logic. For details, see systemd-vconsole-setup.service(8). udev.log-priority=, rd.udev.log-priority=, udev.children-max=, rd.udev.children-max=, udev.exec-delay=, rd.udev.exec-delay=, net.ifnames= Parameters understood by the device event managing daemon. For details, see systemd-udevd.service(8). plymouth.enable= May be used to disable the Plymouth boot splash. For details, see plymouth(8). luks=, rd.luks=, luks.crypttab=, rd.luks.crypttab=, luks.uuid=, rd.luks.uuid=, luks.options=, rd.luks.options=, luks.key=, rd.luks.key= Configures the LUKS full-disk encryption logic at boot. For details, see systemd-cryptsetup-generator(8). fstab=, rd.fstab= Configures the /etc/fstab logic at boot. For details, see systemd-fstab-generator(8). modules-load=, rd.modules-load= Load a specific kernel module early at boot. For details, see systemd-modules-load.service(8). SEE ALSO
systemd(1), bootparam(7), dracut.cmdline(7), systemd-fsck@.service(8), systemd-quotacheck.service(8), systemd-journald.service(8), systemd- vconsole-setup.service(8), systemd-udevd.service(8), plymouth(8), systemd-cryptsetup-generator(8), systemd-fstab-generator(8), systemd- modules-load.service(8) NOTES
1. kernel-parameters.txt https://www.kernel.org/doc/Documentation/kernel-parameters.txt systemd 208 KERNEL-COMMAND-LINE(7)
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy