Member Avatar
Hello Everybody, I am trying to run a simple script to monitor a log file, where I need to send an alarm every time specific line is being written into this log file, currently my script is working fine, the problem is with the miltiple lines that is being written …
by fo2sh -4 in Linux and Unix ()
Member Avatar
... I have an empty file called backups in my backups directory to keep the tar file from trying to backup itself. Does anyone know why I'm getting this output? -> ... Note that there was a backtick between leading and ../ .
by lewashby 14 in Linux and Unix ()
Member Avatar
I have (roughly) the following code: ... I keep getting the literal output of "${WHATIS}. I did this ages ago but can not remember how or find the code I used. Any help would be appreciated
by ennoil in Software Development ()
Member Avatar
I have a C++ program with a main routine which reads arguments from command line: ... In my system I have defined som aliases in my bash environment which abbreviates directory names. Example: ... My program is called "dircopy" and I want to use the following input: ... But I …
by it@61@sec 14 in Software Development ()
Member Avatar
Member Avatar
I am working on a shell script that takes a single command line parameter, a file path (might be relative or absolute). The script should examine that file and print a single line consisting of the phrase: Windows ASCII if the files is an ASCII text file with CR/LF line …
by kww228 in Software Development ()
Member Avatar
A 22 year old vulnerability, yes you read that right, has been discovered which some security experts suggest could be bigger than Heartbleed. The bug, reported as ' ... ' relates to how environment variables are processed: with trailing code in function definitions being executed independently of the variable name. …
by happygeek 1,608 in Linux and Unix ()
Member Avatar
I am defining the following variables inside a bash script (note: I ultimately want to pass these values to the bash script from the commandline but I haven't gotten that far yet): Next, inside the bash script I'm attempting to call an awk script and pass it these same values: …
by spowel4 in Software Development ()
Member Avatar
Hello! I am normally in the PHP / Web Development section of DaniWeb. It's a pleasure to finally have a reason to check out other sections of DaniWeb! So, I am logged in as root at the Command Line Interface over SSH - on Debian 7 Wheezy running on a …
by cjohnweb 14 in Software Development ()
Member Avatar
I want to find common line in two files and replace the next line of first file with the next line of second file. (sed,awk,perl,bash any solution is welcomed ) Case Ignored. Multiple Occurrence of same line. File 1: file 2: Later File 1 should be:
by Madira in Software Development ()
Member Avatar
#How to create a standard deviation based on the baseline for the 6 months AND after calculating the standard deviation, it will do a flag and prompt/inform the user that it exceeds the baseline, for example it hits more than 97 or 125 or lesser than 11 or lesser than …
by Zizou_1 in Software Development ()
Member Avatar
I am trying to search for a shell script if it is running and then assigning the count to a variable. Let the script be ScriptXYZ.sh. I wrote: The problem that I am facing is that even when there is no instance of the ScriptXYZ.sh running I get a proc_count …
by santakdalai90 in Software Development ()
Member Avatar
I need a script that connects to a device on my network and export a list of data... I get some desired output but not completely. The output has more than 4000 lines and at line 80 the script gets a line " --More-- " waiting for user. How can …
by jeansantos in Software Development ()
Member Avatar
i've just given a script to update and maintain by my manager, but its bash and i dont know that much about it.. i currently have a script that looks through .txt files for given serials that then reports to a php webpage. within this script we have around 20 …
by JukesK in Software Development ()
Member Avatar
I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. …
by chriswelborn 48 in Software Development ()
Member Avatar
I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. …
by chriswelborn 48 in Software Development ()
Member Avatar
This is another useful script I came across. It prints a color-code chart in your terminal. It can help you find the color-code you are looking for, or view the current color-scheme you are using (people use it on reddit/r/unixporn to show off their system's theme, I use it to …
by chriswelborn 48 in Software Development ()
Member Avatar
I didn't write this, the credits are in the code. It's a code-golf version, and I'm sorry about that. I am trying to 'decode' it but I don't have the skills, so the 'decoded' version doesn't have the right colors. This is an example of what you can do with …
by chriswelborn 48 in Software Development ()
Member Avatar
Hi, I am trying to write a small shell script that will take user input on SVN branch and validate that the requested branch exists in SVN. And then continue with other operations if the branch is valid. I tried the following but seems its not working right:
by boshu in Software Development ()
Member Avatar
i am a beginner. i need online tutorial for shell scripting. there are many on the web.. which one to choose??
by pooh1234qwerty in Software Development ()
Member Avatar
I have a bash script that executes @ init level 3. I would like to "wrap" (for lack of better word) this bash script in a php script. Use the power of php to supress any output from the bash. Also display only the splash logos (like what you see …
by naphets in Web Development ()
Member Avatar
I have to write two scripts, one in bash and one in dos. My dos one works perfectly but I'm having trouble with my bash one. The assignment is to make a script that takes a command line argument (from a test script) and return the change. So if the …
by Akusa in Software Development ()
Member Avatar
Hello everyone, i am fairly new to shell scripting so please bear with me. The following script is supposed to read words from a file and depending on the word print different things. However it always prints the default value. It also refuses to work completely if the first line …
by replic 17 in Software Development ()
Member Avatar
So Im using our university servers through an ssh connection. I have a bunch of files in a directory which I would like to run through a perl script. So I thought this simple script I concocted should do the trick. I have used similar script on my home computer …
by jpreem in Linux and Unix ()
Member Avatar
I'm almost done with college and I want to work on a side project that I could use to show case my skills. I'm looking for something that I can combine a bunch of different aspect into one. I know this will be a big project and won't be able …
by jdm in Linux and Unix ()
Member Avatar
I have a bash script (test.sh) which reads parameters from the command line. The parameters could look like this: param1 param2 param3&ext param4 param5 The problem is that when the script reads the parameters and then echo them I get the following: I want the output to look like this: …
by it@61@sec 14 in Software Development ()
Member Avatar
hi, i am trying to parse a collection of text files that look like following. there a number of them but not all are structured exactly the same way.if i figure to parse this file i can handle the rest.i am novice in bash, and i want to parse the …
by amnakhan786 in Software Development ()
Member Avatar
Hey all, Wanted to ask a question about the guest profile on Mountain Lion. I have always been a little insecure about changing and adding new feats to the terminal, so I'm trying to figure out a way that I can be more secure. I have recently edited both bash …
by saltex in Mac OS X ()
Member Avatar
Hello All, This may be the wrong place for this and if so I apologize in advance. I have been tasked with organizing a drive full of marketing assets on a mac server. It is currently in use so we have made a duplicate share so that any changes will …
by 24x24 in Software Development ()
Member Avatar
does anyone know how to add one to an integer with bash? I tried ++$i (name of the integer)
by Sanchixx in Linux and Unix ()