1,817 Topics
| |
| I'm writing a bash script that redirects the output of a command to a file. The next thing the script should do is read the contents of the file, into the tenth line of a python script. It's tricky, because the line of text in the python script should read: … |
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 … | |
I very new to C Shell. I am trying to do is read from Command line. Find the if the file is zip, .txt, symbloic link,pipe, unknow (if file is not zip, txt, sy....) here is what I what got so far. I am very stuck atm Please help me … | |
How can I use seleium test case in groovy? such as clinking on links. test case <html> ... <body> <table> <tr> <td>open</td> <td>https://url.web:8010/</td> </tr> <tr> <td>clickAndWait</td> <td>link=service=homeLink</td> </tr> <tr> <td>clickAndWait</td> <td>link=name=contentLink,service=Queue</td> </tr> <tr> <td>clickAndWait</td> <td>link=BackLink</td> </tr> ... groovy script // Setup credentials def String[] credentials = new String[2] credentials[0] = … | |
In real time applications where we use shell scripting and how it differ from other scripting languages? | |
Hi All, I'm working on a script which has a primary function to look for jpg files. I can get it to work if the folder path is just my desktop but if I try the start of the path to be C:\ it errors out. Right now the error … | |
Hello, i want to try to make a simple program that guesses the password of wifi for education purposes. And writing the guess program is the easy part but here comes the hard. this is the way you connect to wifi with cmd **C:\>netsh wlan connect name=wifiname ** But where … | |
Write a shell script, guess.sh that implements a simple number guessing game. When run, the shell script prompts the user to guess a random number between 0 and 100. If the user guesses incorrectly, the script prompts the user “Guess higher” or “Guess lower” as appropriate and allows the user … | |
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): OFS=',' INPUTFILE='~/data.txt' OUTPUTFILE='~/delimited.txt' FIELDWIDTHS='1 10 4 2 2' Next, inside the bash script I'm attempting to call an … | |
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 … | |
Hi. I have here a script which I had acquired from the net. I have tested it in a lab environment and it seems to accomplish my task perfectly. That being- to list each server in the domain, its services and the account the service runs under. Problem is- I … | |
I am trying to get two input from a file . #!/bin/bash echo "enter clientname" read clientname echo print|nsradmin -s $clientname -p390113|egrep 'NetWorker version|IP address'>> output_$clientname the content of the file would be : $ cat test_new1 NetWorker version: 7.6.3.2.Build.860; IP address: xxx.xxx.xxx.xx; I want to grab "IP address:" to … | |
How to make Ctrl-Z work with xterm -e "ping localhost" there will be a child process but how to pass the Ctrl-Z to that process? I tried Ctrl-C and S and Q they are working fine... | |
How to read oracle control file's data using a shell script? Shell script is in Unix. | |
Could someone help me with a Shell Script OR a perl script which could read the below INPUT File and print output in format listed below. The logic I am looking for is to read each block within the asterisk line, then search for "until:". If the date of "until:" … | |
Hi, I am familiar with shell script but not really have much experience. I am looking into a shell script that would do this I have 2 tables TableA id name interest ---------------------------------------- TableB id name I have to create a shell script which copies all the id,name values from … | |
Hi, I am struglling to send an image in my email. In the program I am using the shell command sendmail in usr/lib/. I had set the content type to html/text. When I am writing the html tag <img src"<someimage>"/> in the body. The mail when sent is not having … | |
What I would like to do is read each line in the atdinfile: A sample atdinfile would look like this: 651 652 653 654 655 656 657 658 659 660 661 664 665 666 667 668 I would like to grep through each atd job id looking for a match … | |
Team, Can any one assist me with my below script requirements I log into a jump box with my login and password, Here I need to create a script which i will run from this point that will connect to a different server using ssh and it should prompt me … | |
I am transfering files from system directory to server directory which works perfect. But i need to run batch file after every half n hour. I need to make it as a **batch file** please help ftp -i 21.49.567.12 username password cd "uploads" lcd "c:\up" binary mput p* disconnect bye | |
Hi Guys, I'm new to awk and trying to format an stadout "temp.txt" to csv format so I can export to excel. I'm having issues here is my code so far..If any one can help to see the light!!! The ### sign is the second server on the list each … | |
How to validate multiple inputs on a dialog form using shell scripting? Validations must be performed before submitting form or when focus shift to any other input field . | |
I am having this simple script: #!/usr/bin/expect -f set values "#host=CE101 #host=CE102" set found [regexp {[A-Z]{1,2}\d{2,3}} $values CE CE1] if {$found == 1} { puts "px is $CE" puts "vpx is $CE1" } else { puts "\nfailed to match anything from\r\n$values" } puts $found So my problem is that regexp … | |
[Click Here](null)Hello dani. I know how to write to a file using redirection. But I am unable to write a record to every new line. I want it this way alex amsterdam 800 7 But I am ending up putting everything in a new line, I mean the fields or … | |
Not hot on sed.. I have the string <Report name="05/14/14 05:05:53 AM - Report"> in a file. I need to change the date and time part to the current date and time.. any sed regex to match the date format and timestamp? | |
Hi Team, I have a file which contain following data like BKP0000032183140217000019 053IGZYEVSDOX .........field 2....... field3.....field4..... BKP0000032284140217000019CCTP1220 ............... BKP0000032384140217000019CA ..................... each line has 5 fields Now using shell script i am trying to extract field 4 based on condition that line start with BKP and contain code 84 and CA … | |
| I have been beating my head into the desk with this issue, and I don't think it's a simple 'uniq' or 'sort' issue. I have a file, with many duplicate values in them. File ---------- dog dog cat owl owl turkey weasel giraffe giraffe rooster The output I am looking … |
Hi Team, I am new to shell script, i have knowledge of basic unix command but that doesn't seem working for my current task. Please help me with following problem: I have a xml file for e.g. <ShippingInstructions> <name>Sarah Bell</name> <address>400 Oracle Parkway Redwood Shores CA 94065 USA</address> <telephone>650 506 … | |
Hello All. I have an issue with string manipulation. The file which I am using has two lines : First String: 1 4 Second String: 5 4 What i am trying to do is while reading each line, i would like to store each variable in the line into 3 … | |
Hello all, I am by no means a coder, so hopefully someone has something they would be willing to share that would meet this need. I would like to have a Outlook rule, where: - When an email comes in from a specific account - Has an attachment (PDF, doc, … |
The End.