-2
votes
2answers
19 views

Trying to call a script while passing two arguments

I have a script that greps with $1 and $2, first argument being a pattern and second being a file. I need to create another script that calls this first one, passes the two arguments to it, and if ...
1
vote
1answer
14 views

run a process from script and kill it from another script using PID

I want to run a process from script and kill it from another script using PID. I can think of two things to do but I think you can help me get more effective way of doing this. The first one is to ...
1
vote
3answers
24 views

Number of arguments requirement input validation

Writing a script to search a file for a pattern and output the lines found with that file and the number of each line. I have the script as #!/bin/bash echo "------ File =" $2 "------" grep -ne $1 ...
2
votes
2answers
48 views

How can I programmatically send a blank password?

I have a shell script that checks out a subversion repo. The connection asks for a password (I know it's an unnecessary layer since the password is blank), but how can I send a blank password to ...
0
votes
0answers
9 views

How to install mysql client on OpenWRT WhiteRussian?

I'm trying to install mysql client on openwrt whiterussian. To do this, I installed libmysqlclient (ipkg install libsqlclient), but it doesn't works. When I run a script with mysql queries, this ...
0
votes
1answer
12 views

How to make a wget and mysql bash script

I want to make a bash script that will get a bunch of urls from a mysql table and pass all the urls one by one to the wget --spider , and update the mysql with the response code from wget: "HTTP ...
0
votes
1answer
47 views

Count the distinct words

I have an input file is like: com.a.b com.c.d com.a.b com.e.f com.e.f com.e.f And I would like the output to be like: com.a.b 2 com.c.d 1 com.e.f 3
1
vote
2answers
53 views

linux bash script get user input and store in a array

I want to write a bash script that will get user input and store it in an array. Input: 1 4 6 9 11 17 22 I want this to be saved as array.
0
votes
1answer
33 views

cygwin kill process issue

I am trying to run a shell script in Cygwin, but I am having problem with passing variables to the subshell !! I have a very simple script that actually takes the PID of a process and from there I ...
0
votes
1answer
20 views

cURL - notify about upload progress

I have script in Xcode, which runs automatically at the end of Archive operation. It's signing and submitting build to TestFlight service. The problem is that uploading takes a lot of time, and I ...
0
votes
1answer
54 views

syntax error: unexpected end of file

I am getting this error when I run my Bash script: syntax error: unexpected end of file Cant really find where the error is, been looking for hours and still get this error. Here is the script ...
0
votes
2answers
32 views

Filter non-alphabetic characters out of string in shell script

Very simple question but can't seem to find a simple answer... I am writing a bash script which needs to remove all non-alphabetic and non-numeric characters. Eg. I want... INPUT_STRING="ABC# ...
1
vote
3answers
49 views

What does single parenthesis do here?

I encountered this code: file=$(<filename) This reads the file from the filename. My question is how does this work? I read from this post: bash: double or single bracket, parentheses, curly ...
2
votes
4answers
87 views

Bash script - If conditional with [ ]

I have the code below and am receiving the following error output: Enter your exam score 40 ./if2.sh: line 6: 40: No such file or directory Very well done. You have an A grade. I'm using bash ...
1
vote
2answers
67 views

Bash Script Issues

I am having a problem with a bash script that I am working on, I am practically new to Bash Scripting and been working on this problem for hours and cant figure out what the problem could be. When I ...

1 2 3 4 5 112
15 30 50 per page