1,892 Topics
![]() | |
Hi Can anyone help on how to add passwords to already created users non-interactively in shell script. Passwords will be stored in one text file. Script should automatically take passwords from file. Thanks in Advance Vishwajit | |
I need some help with this: I want to compare 2 files, and get an output file with only the new lines of File2 (compared to File1) I didnt manage to do this with diff, any suggestions how to solve this? Example: File1: A B C File2: A B C … | |
HEY, I am new at this but I am in a middle of an excercise for an online class I am taking and I am doing a exercise and I am stuck. the instruction are as follow : write a shell script that will take information from 2 fles and … | |
Hi i m devloping one intratnet appllication for that i want some hardwre information like memory type,memory bank, BIOS information. I have no rights login as super user. if anybody has any idea for that plese give me reply. | |
Comparing two variables -------------------------------------------------------------------------------- Script #!/bin/sh hardware=PC os=WindowsNET for i in `cat newservers` do x=`sudo /opt/openv/netbackup/bin/admincmd/bpplclients |grep $i |head -40 |grep $i|awk '{print $3;exit}'` if [ "$i" -eq "$x" ] then echo "$i is already added" else echo "Need to add" fi done O/p in debug mode bash-2.05$ sh -x … | |
Please help!!!! ok the first file is this dave 734 bob 313 carol 248 mary313 ted248 the second file is bob tuesday carol monday ted sunday alice wed dave thurs the output has to be name on call phone carol mon 248 bob tues 313 alice wed etc... i need … | |
I got 2 fiels with information on both i need to put the information all in one file useing loop. how the hell do I do that, I have 2 files one named p21 the p22 and now in a looping structure i need to print an output of thei … | |
I wants to get the Bios information in linux It is possible by [B]biosdecode[/B] and [B]dmidecode[/B] But they need login of super user so i am not able to run them on Rad Hat Linux I am using. Is there any other command to get Bios info, or any script … | |
HI i AM TRYING TO WRITE A SHELLS SCRIPT THAT WILL TAKE INFORMATION FROM 2 FILES AND COMBINE IT INTO ONE FILE USING LOOP, NOW i AM STUCK i GOT THE 2 FILES ONE IS NAMED DATE THE OTHER IS NAME THE DATE FILE CONTAINS PEOPLES NAMES WITH A A … | |
How I can know OS details,cpu details and the running processes of a remote machine without logging that machine. | |
Hi, I have a list of data in text files with :- ColA ColB ColC ColD ColE ColF 12 122 2280 30 0.012987 1.776 13 118 2280 30 0.012987 1.954 14 115 2620 30 0.011321 2.131 15 113 2654 30 0.011177 2.309 16 145 1882 25 0.013110 2.487 17 112 … | |
[code] #!/bin/bash ARCHIVE_PATH=/archive CURRENT_DATE='date +%F%H%M%S' echo running at `date` >>~/Logs.txt for FolderToSearch in $(ls -l /home/stuff/tp |grep ^d|awk '{print $9}'); do find /home/stuff/tp/$FolderToSearch/in -name '*.*'|awk '{print "zip -m " $ARCHIVE_PATH "_" $FolderToSearch "zip2arc.zip" $CURRENT_DATE;}'|bash|tee -a ~/Logs.txt; done [/code] Hi there, I'd appreciate it if anyone can tell me how to … | |
How can i get the OS name and its version in linux shell script Is there any command to extract OS details from linux shell script. | |
Hi I want to write a script file that first executes a command [code] /usr/sbin/alternatives --config java [/code] which asks to enter a number.... i want to give this input automatically by the script... i dont want human intervention....how can i do this..... | |
Hi I am new to scripting.... i want to write a simple script file that executes the following command `java -version`.... i have to read the output given by this command inside my script.... [code] var_name=`java -version` echo $var_name [/code] just displays java -version i want the output of java … | |
Hi guys, Couldn't find a suitable forum for this question, please move this thread if needed. What I need to do redirect the output of TOP to a text file. Doing a simple %> top > top.txt yields the following %> less top.txt load averages: 0.88, 0.89, 0.87 11:50:49 100 … | |
I'm having real trouble getting my script to work, it's about 3 pages long and I'm having trouble with one of my if...then constructs. The code for the sub is as follows: [CODE]check_a_b () { CHECKA="634274" CHECKB="512274" if [ CHECKA=CHECKB ]; then echo "Match" echo "$CHECKA" >> "$LOGFILE" echo "$CHECKB" … | |
[COLOR="Red"]We have a plant in which all the activities are recorded in a log file. We have to make an application which retrieves data from the log file,like history of a product which is passed from various work stations. we want to make an application which takes selected data from … | |
Hi, I have multiple text files (.txt) which is a table like input:- Column1 Column2 Column3 Column4 1 5 10 15 5 10 20 40 .......... This is just one of the .txt files and I want to insert these txt files into separate worksheets in excel workbook. Any idea … | |
Hi All Im having issues with my mail command sending data from my script. I have a korn shell script which logs onto a database and does a few select statements. The problem is i think the EOF stops my mail command sending the data. Im able to run the … | |
Hi, I have the following file input:- [CODE] 542 4795 61 543 4795 61 544 0 0 545 292 2 546 292 2 547 0 0 548 0 0 549 0 0 550 111 4 551 0 0 552 0 0 553 4614 63 554 4614 63 555 0 0 … | |
Hi Guys, I need a help. I am pretty new to the shell level programing. I was trying to split a long lines to a multiple lines with few conditions. I goggle for the code and found some snippets and tried to modified it but I got few strange problems … | |
using sed print the lines that have more than 10 characters, of each file. the files arre given as parameters. i did this: #!/bin/sh a=0 zece=10 if [ $# -eq 0 ] then echo "An error occured regarding the parameters. " else for i in $@ do if [ ! … | |
Hi, I want to append each line in a file with string "foo foo" if number of charcters in the line are 4000. There can be n number of lines and this scenario applies to all lines. .. any takes? i want shell to do it. -Seemit | |
Hi, I have two files-- file1- Quote: dn: cn=Anandmohan Singh,ou=addressbook,dc=thbs,dc=com objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson cn: Anandmohan Singh givenName: Anandmohan mail: [email]anand_ms@thbs.com[/email] mobile: 9986010455 ou: null physicalDeliveryOfficeName: ST-6th Floor sn: Singh telephoneNumber: 41827200 Extn: 7400 title: Associate Software Engineer - Trainee uid: 1432 dn: cn=Riteshkumar Mohanty,ou=addressbook,dc=thbs,dc=com objectClass: … | |
hi, i'm a very new in unix, can u help me how would i start to read sell programming. can u suggest me some name of tutorials thanks | |
![]() | I want to write a shell script that finds files in a directory that are (owner permissions) readable, writeable, or executable for the owner. But I don't know the command to list files with certain permissions (rwx)... I'm sure it has something to do with ls, but I just can't … |
Hi all; I'm having headache on append one line to another based on the fix position.Hope u guys can help. All i need to do is append the line that start with '3' to a line which start with '1' and the position for line 3 that i need to … | |
I am trying to write a command line bash script that will allow you to send mail to an email address using some variables. The email is a signup form with username and passwords. The subject line and most of the body will be hard coded. The script should ask … | |
Hi guys, After trawling through the forums and interweb, hopefully someone here can offer me some help with sed! I have a csv file that contains records. Each field is delimited by a comma, and each row is delimited by a \n. However, in some cases, I need to remove … | |
hey I need a script to set a display to users ip's, I just need help putting it togther the command i need to run is setenv DISPLAY ipaddress:0.0 And i've got this to grab the ip and pop in the :0.0: who|grep user | awk '{print $6}' |sed 's/(//g' … | |
Can any one tell me how to convert any types of file to pdf? I want a shell script or a software in opensource? is there any software that can do this? Please help me. I would be very much thankfull to u. thanx in advance Dushyant Joshi | |
hello there I am new into scripting . What is the use of unix shell scripting with oracle and how can I combine oracle with unix shell scripting? Any replies regarding this would be great. Thanks in advance, Techbrain55 | |
Hi, I am trying to call a certain command from within a shell script, but everytime it executes the script, only the first command runs and it comes out of the control, how do i do it? code : ```````` #!/bin/sh # # #i=1 #while [ $i -le 3 ] … | |
A file is ELL[COLOR="Red"]P[/COLOR][COLOR="Red"]S[/COLOR]YST[COLOR="Red"]A[/COLOR]TL ELL[COLOR="Red"]S[/COLOR][COLOR="Red"]U[/COLOR]YST[COLOR="Red"]L[/COLOR]TL * * *[COLOR="Green"] : . [/COLOR]* * *[COLOR="Green"] :[/COLOR]* * H[COLOR="Red"]H[/COLOR]ULJKL[COLOR="Red"]O[/COLOR][COLOR="Red"]P[/COLOR]OA H[COLOR="Red"]P[/COLOR]ULJKL[COLOR="Red"]P[/COLOR][COLOR="Red"]O[/COLOR]OA * [COLOR="Green"].[/COLOR] * * * * *[COLOR="Green"] : : [/COLOR]* * and it is a long file ..... so output shud be where there is[COLOR="Green"] : [/COLOR]and [COLOR="Green"].[/COLOR] counting start from E and … | |
Hi Folks I need help about a script. Here are the detail of of Script. I have total 3 files which have following records. 1. file1 -> contains all userids 2. file2 -> random userids, some are present and some are not. 3. file3 -> ls /home file, whever directories … | |
hi frnds, I need a batch program that can reboot every time a system starts.It should work in NT systems too. | |
Dear all I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that. What I actually want from this shell script is that it will move all the files one … | |
Hi. I created 100 dummy mp3s, and I used the id3tool to change the tags on them. Each mp3 is named some number with the extension of mp3 appended to it (ex: 20.mp3). When I click on the file, the tags that I changed appear. What I'm trying to do … | |
To implement a very primitive shell (a Toy Shell) that knows how to launch new programs in the foreground and the background. It should also recognize a few internal commands. More specifically, it should support the following features. It should recognize two internal commands: exit and cd. exit should use … | |
I am attempting to write a script that will add a user to the system. I am using fedora 5 and am attempting to use the useradd: command but i receive "command not found" I am also trying to get the current users from the system so i can check … | |
I am using the below code to return the pid. But it works only if the pid is 4-digit. It returns nothing if the pid is 5-digit (see the examples). How do I fix this code for both the instances. Thanks in advance! Mamtha pid =ps -fu truecomp | grep … | |
i have DSL router with an ip address a.b.c.d i want to write a Linux script, which when executed can restart the router. Please can anyone help me out? thnx in advance. | |
I doing a proof of concept script to automate getting a field from ps. Currently, the script takes 2 imputs and I'm almost there but cannot get awk to recognize $2. I want to invoke it like this: #./script init 2 (search for init and get PID). Obviously, $2 to … | |
hi guys, can u help me out with how to develope a shell in linux | |
Hello all! I am fairly new to linux. I am using fedora7 bash. I am using an awk statement to extract several fields from a file and assign them to variables within awk. With some fields in that file and some variables made within awk i would like to use … | |
Hi, I am trying to make a shell script that will parse lines off error_log of Apache and parse IPs off of it. The lines I need to parse are security warnings made by ModSecurity. Example: [CODE][Fri Feb 22 22:18:46 2008] [error] [client 111.222.11.22] ModSecurity: Access denied with code 406 … | |
Does anyone know of a simple way of automatically sending replies to emails, which can repeat X amount of times. For example, I want to reply to an email from John Smith 20 times with "ABC" , "DEF", "EFG"....etc.. sequentially.. Thanks.. | |
Looking for some help in renaming files using a shell script. Suppose I have a directory which contains several files, some of which are `*.dat` files. If there are 7 `*.dat` files, I would like to rename all 7 `*.dat` files to `*.01`, `*.02`, ... `*.07` Here is what I … | |
[CODE]Programname=$(basename $0) # While scheduling to cron, program name is needed. Usage="Usage: $Programname [-a mtDelete/mtBackup] [-l/-L Backuplocation] [-t now/cron/hh:mm]" IsCronJob=1 # default, script will run at now. isBackUp=0 # default, it will take back up. lFlag=0 # it is optional. default value is zero LFlag=0 # it is optional. dfault … |
The End.