1,891 Topics
| |
hi, I am new to scripting. I want to change username and password of a user 500 times. I dont want to use except .....please somebody help. Thanks in advance, Pallavi | |
:) Hi all Am writing a shell script like this: java file1 > output.txt and the output output.txt is used in a html page. Now coming to my problem: This script should run every one hour and when user views the html page,it is showing the partially written output.txt file … | |
Hello. I have the following problem with bash code: [CODE=bash] function fl1_load_modules_and_get_list() ........... for module in $FL_MODULES_TO_PROCESS do source "${FL_MODULE_DIR}/${module}/module.sh" done ........... } function fl1_handle_install { local FL_MODULES_TO_INSTALL=$(fl1_load_modules_and_get_list $1) #Executing pre-install routines for module in $FL_MODULES_TO_INSTALL do fl_mod_${module}_pre_install done } [/CODE] First function is called inside the second one. First … | |
Here file abc.txt contents name designation salary ----------------------------------- pritish am 15000 animesh pm 20000 asutosh ceo 30000 Write a shell script to find the name whose salary greater or equal t0 20000 | |
Hello. Is there a way in bash to call a function by it's name? For example, I have: MODULE_NAME='test' FUNCTION_NAME='execute_run' How do I call the function with name test_execute_run? I need this to solve the problem of modularizing my bash script. Thank you. | |
All, I am relatively new to bash scripting. I have been a Windows Admin for 10+ years and script various tasks in windows, but Linux is a different story. So any help you can provide is greatly appreciated. What I need to do is restart the sshd service on 30 … | |
hi everyone, im searching for a way to insert several values i get from a command [top |grep root |awk '{print $10}'] to a variable, so that the variable will contain the sum of all values returned. (trying to calculate MEM usage by all root processes ) can anyone help? … | |
Hello everyone: I want to change this date "12 Apr 2006 23:35:47" into "2006-04-12 23:35:47",I have tested lots of parameters of the command "date",but it still not execute UNDER FreeBSD,pls help me,thanks! | |
my script try to combine a variable(include space) with another variable, and put them together as a command's parameter, I put "" for the variable which includes space, but it is always broken into two strings and make the command fail. [code] bash-3.1$ ./space.sh ./param -J "t space" sleep 10 … | |
Hi ALL, I want to print some lines from file like example ===== RECOVER DATABASE ALTER DATABASE OPEN; ALTER TABLESPACE TEMP ADD ALTER TABLESPACE TEMP ADD STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE -- SET STANDBY TO MAXIMIZE PERFORMANCE MAXLOGFILES 16 MAXLOGMEMBERS 5 MAXDATAFILES 512 MAXINSTANCES 1 MAXLOGHISTORY 7260 LOGFILE I … | |
Hi. I'm new to linux. I have a question.... What is the difference between BASH Scripting and AWK? When would I use one over the other? | |
Hi there, I have recently put together a net send messenger in a .bat file for a program of mine. I would like to make it so, if the "net start messenger" line fails/has an error, It echo's " messenger service is currently disabled on your computer. press F1 for … | |
I wrote a post-install script, which is executed after the package installation by command like " pkgadd -d /mypackage.pkg". I also want to read user input in post-install script as follows: [CODE] while [ "$ANSWER" != "y" -a "$ANSWER" != "n" ] ; do echo "Apply changes to database? [y/n]:" … | |
Good day everyone. I'm completely new to scripting. I'm trying to practice in it. I'm using Bash on a SuseLinux 10.3 box. I want to practice by sort of creating my own simple IP Monitoring app that will notify me when somethings down. That said, here's my first simple but … | |
Shell Programming for UNIX/Linux is finally over thank god! C/C++/Perl I hate that shit lol it's over and I learned something. 1&>2 = I dont really know if this is right lol or 1>&2 = Something is redirecting something lol | |
I was wondering how this looks. I am trying to create a script that will produce a text file that has a list of the files in the present working directory. How do you go about testing this script? #!/bin/bash # # Matthew Smith# Comp230 ls >FILE.txt | |
Hello List, I do not have any experiece with the shell scripting. I need the help to solve an issue. This script is calculating the value of Nth day correctly which is just for next one month. Now what I need to do is to calculate the same occurence pattern … | |
Hi, I am creating sed commands based on input file that has some numbers in it. When I run a the following command on command prompt, it gives me desired result. [echo "sed -n '2,$ s/^\(.\{"$i"\}\)\(.*\)$/\1,\2/'"] i.e. value of the variable is replaced and a sed command is generated in … | |
Hi All Anyway to add a note inside the email saying here is your file after attching a file in unix?? For example my script is fine attaching the excel file but i would like a message inside the mail too and not in the subject title. [QUOTE]/usr/bin/uuencode $adhocreport $adhocreport … | |
i using getopts but when i type in the argument it not working. Is there anything wrong wif my script? bcos when i enter bash filename -P -S , i should see "hello" msg but i don. [CODE]#!/bin/bash while getopts "PS" opt; do if [ $# -eq 2 ]; then … | |
Hello ya'll, I stumbled over here looking for some help with Bash shell scripts.. See, the problem was I needed to copy a data DVD into (onto?) the system file space. Since this is a virtual machine, copying a DVD takes a very long time, the drive gets hot, starts … | |
I have to create a Pseudo code for a class that is it's second week (I registered Late) I have no idea what I am doing. I have to create a program that writes a file that lists student ID #'s and their final scores. This is the data I … | |
Is there any function in shell that enable to check for upper or lower case? i would like to check the input argumnets for upper or lower case. | |
i wanted to printout the last entry of the file without passing in any arguments but how can i able to do it? i know how to print out where argument is supplied and doing a grep to match it. example inside the file i have: apple:2:1:3 orange:1:2:3 grape:2:3:4 i … | |
Hi Everyone, Is it possible to convert a .sh script to VBS? If so, how should I go about this pls? The issue is that i have found a script which does exactly what i need, but it is written as a .sh we are a pure windows shop and … | |
This script will show the top 5 processes that are using the most CPU percentage. What i'd like to do is color the process that is the highest, which should be the first line. Does anyone know how to do this? [CODE]#!/bin/bash COL_GREEN='\E[32;01m' ps -eo user,pcpu,pid,cmd | sort -r -k2 … | |
Hi ! I am newish to scripting. I have inherited an Apple Xserve running 10.4.11 server There is a script run each night that creates an zipped archive of some data. These can be quite large so I have to prune them regularly. I need to check that the youngest … | |
I'm trying to add colors to this bash script, can anyone help? [CODE]#!/bin/bash # Script to connect to the sprint network # Colors # ESC_SEQ=“\x1b[“ COL_RESET=$ESC_SEQ“39;49;00m“ COL_RED=$ESC_SEQ“31;01m“ COL_GREEN=$ESC_SEQ“32;01m“ COL_YELLOW=$ESC_SEQ“33;01m“ COL_BLUE=$ESC_SEQ“34;01m“ COL_MAGENTA=$ESC_SEQ“35;01m“ COL_CYAN=$ESC_SEQ“36;01m“ case "$1" in connect) pppd call sprint updetach echo -e $COL_GREEN"**You are now connected to the sprint network!"$COL_RESET … | |
Hi guys, Basically what I want to do is run a series of commands in my batch file, and display stdout to screen as well as saving it in a file. So to set the context.. [code] ::To output to helloworld.txt Echo hello world! > helloworld.txt ::To output to console … | |
This code , which is basically created "createdtxt.txt" text file that writes each files location dir /s/b D:\mypictures\*.JPG >createdtxt.txt would give me a file createdtxt.txt with these lines D:\mypictures\DSC07861.JPG D:\mypictures\DSC07870.JPG D:\mypictures\DSC07871.JPG HOW can i add simple command into this code that would give the name John before each line example: … |
The End.