1,891 Topics

Member Avatar for
Member Avatar for boshu

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: VALID_BRANCHES="4.2.1 4.1.0 …

Member Avatar for Watael
0
265
Member Avatar for pooh1234qwerty

$ awk -F ":" 'NR!=1 {print $1}' test1.txt what does this mean?? especially ":"??

Member Avatar for Watael
0
110
Member Avatar for pooh1234qwerty

i am a beginner. i need online tutorial for shell scripting. there are many on the web.. which one to choose??

Member Avatar for DoRight
0
232
Member Avatar for rexmatthew

Basically I got 2 calendar scripts from the same source. I saw a custom script before that merged these two but Everything I tried failed. Please help. Here are the 2 scripts. Script 1: $('#date3').DatePicker({ flat: true, date: ['2008-07-28','2008-07-31'], current: '2008-07-31', calendars: 3, mode: 'range', starts: 1 }); Script 2: …

Member Avatar for rexmatthew
0
242
Member Avatar for happygeek

New research shows that hackers are becoming increasingly lazy in their search for online exploits, with 98% of Remote File Inclusion and 88% of SQL injection attacks now being fully automated. It comes as no surprise whatsoever to DaniWeb administrators and moderators that your average cybercriminal is looking for the …

Member Avatar for LastMitch
1
541
Member Avatar for OsaMasw

hello guys, unfortunly my website got hacked few hours ago, and after investigations I found the was a c99.php file on my server so i deleted it and stopped any upload proccess and change back my chmod to default I want to ask how to prevent php files from being …

Member Avatar for naphets
0
2K
Member Avatar for asa88

I am having trouble having redirection working with the ability to hit enter and remain in the same shell. My problem is if user types: ./a.out < foo.txt (where foo.txt contains a command like date) I want to execute that command and exit the shell.However,if the user compiles the code …

Member Avatar for deceptikon
0
362
Member Avatar for gtam

Hello I'm writing a script to get content of web pages on different machines and compare them using their md5 hash hear is my code #!/bin/bash # Cluster 1 CLUSTER1_SERVERS="srv01:7051 srv02:7052 srv03:7053 srv04:7054" CLUSTER1_APPLIS="test/version.html test2/version.html test3/version.jsp test4/version.html test5/version.jsp" # Cluster 2 CLUSTER2_SERVERS="srv01:7055 srv02:7056 srv03:7057 srv04:7058" CLUSTER2_APPLIS="test/version.html test2/version.html test3/version.jsp test4/version.html" # …

Member Avatar for Watael
0
230
Member Avatar for MadJako

Good Morning, I'm new to Powershell and i'm attempting to create a script which will copy a folder to a spesific directory on an FTP site. I did some Googling and all I seem to come up with are ways to copy the folder contents, but not the folder itself. …

0
124
Member Avatar for aditya369

I have been working with web traces and i need to change a particular format of the web trace to another. for example from cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0 cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0 cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0 to cs21 …

Member Avatar for aditya369
0
359
Member Avatar for malluce

Hi, I'm trying to output the return result on terminal by using >; however, I realized that it will overwrite the previous results. I'm wondering if there's a way to append the result to the file instead of overwriting it. So far this is what I have: FILENAME=$1 while read …

Member Avatar for rch1231
0
145
Member Avatar for M4trixSh4d0w

I made a mini compiler to help compile C code easier on linux machines with bash #!/bin/bash function project_menu { header echo "Edit project: $1" dir echo "1) New file" echo "2) Edit file" echo "3) Compile file" echo "4) Run Project" echo "5) Compile & Run Project" echo "6) …

Member Avatar for DoRight
0
243
Member Avatar for malluce

I know the way to read line by line: FILENAME=$1 cat $1 | while read LINE do echo "$LINE" done but what if I have something like "Type \t Value" in each line that I need to separate them in LINE. An example will be something like Integer 2 String …

Member Avatar for malluce
0
159
Member Avatar for vikarna
Member Avatar for rubberman
0
96
Member Avatar for toldav

Hi, I'm trying to run my script but is not working for some reason the functions is not working at all. Anyone willing to help me to find out the error. Thank you. #!/bin/bash DATE=$(date +"%m_%d_%Y"); turn_off_services() { echo -e "\n## Remove unnecessary services" ## Turn off unnecessary services ## …

Member Avatar for toldav
0
138
Member Avatar for microlifecc

I have been trying to install Fedora on my laptop which came pre-installed with Windows 8.I need fedora coz i have a course on Unix shell programming dis semester.But i haven't succeeded coz the bios is kind of different from the earlier ones.can u guys suggest me some way i'd …

Member Avatar for microlifecc
1
294
Member Avatar for jo386

My code is rather basic so excuse my lack of shell scripting experience. I keep getting errors for line 3. I have tried changing "$1" to `echo $1` `cat $1` and even turning the whole line into a variable which i read in another forum and then calling that variable …

Member Avatar for jo386
0
2K
Member Avatar for mcogliandro

I have this script that I thougth only deleted stuff more than 90 days old but after I ran it, it deleted pretty much everything on my backup drive. Thankfuly I have another backup drive so I did not lose my backup but I need to fix this so it …

Member Avatar for rch1231
0
157
Member Avatar for Akusa

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 …

Member Avatar for dfl1954
0
406
Member Avatar for replic

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 …

Member Avatar for replic
0
333
Member Avatar for Fredszky

Firstly, i'm really new to all this bash/unix/c stuff so i will probably get some words meanings wrong here, but anyway: Im trying to make a client pass simple shell commands to the server, which executes them. They communicate locally on the same machine through a socket. I can make …

Member Avatar for nmaillet
0
231
Member Avatar for k2k

Today I have finally made up my mind to quit bat scripting and go for powershell... I need to do a quick script bascially trying to looping through a command output.. can anyone shed some light? i tried foreach ($col in 'app-command -argument') { echo $col } well, guess my …

0
172
Member Avatar for sam.merry

Hello guys, Does anyone know exactly how to make a comparison script for car insurance? Would be great if someone could make one for me (£), or could teach me! Cheers, Sam

Member Avatar for pritaeas
0
317
Member Avatar for Leela2403

I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using %BASH% --login -i "/cygdrive/d/script.sh", where %BASH% is an environment variable in Windows set to C:\cygwin\bin\bash.exe. I have a created a Cygwin environment variable $EXE_PATH = /cygdrive/d/somepath/dir. Inside my script the line is …

0
171
Member Avatar for manujkathuria

Hi i am trying to send email using linux mail command, it does not show any error but its not delivering to the recipient, i am using redhat 5.8 and the command i used is echo "Hi" | mail -s 'Hi' username@gmail.com do i need to configure any redhat file …

Member Avatar for rch1231
0
98
Member Avatar for lewashby

In the following script I can't get the variable STARTPOINT to increment by 3 each time through the loop. I con't get it because the variable NUMBEROFGROUPS is incrementing by -1 each time and both increment lines look identical to me. #!/bin/bash set -x leading_zeros() { local NUM=${1} local NUMBEROFDIGITS=${2} …

Member Avatar for rch1231
0
158
Member Avatar for erezz

Hi, I have a log file contain 28 lines, 1-I need to grep the line with the size next to that i need to grep the name from the line Example: Size element 1. 906K ykms2 2. 1.2M ykps1 2-if one or more of the lines are missing I need …

Member Avatar for erezz
0
209
Member Avatar for manujkathuria

Hi, I would like to write a script to scp files from 1 server to other but the problem is if scp fails maybe because of server crash or somthing like that, i would like to start scp from the last file. i dont want to copy all the files …

Member Avatar for L7Sqr
0
113
Member Avatar for ms061210

Hi, I am creating a program that will validate if the user input date is correct. My problem is checking the month, 1. Is it possible to save the all the months in an array and then check the array if the user input is correct. 2. How can it …

Member Avatar for lewashby
0
205
Member Avatar for lewashby

The following line of code should result in GROUPS holding a number from 1 to probably 4 or 5. I need the next line to simply add 1 to whatever this lines results to. I've tried a lot of tings in bash but I can't make it happen. Any ideas? …

Member Avatar for L7Sqr
0
105

The End.