10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone, I have problems with this script.
This script should check for a folder for each server in the list of the list.txt file.
The script only checks the first host, and then exits, why?
#!/bin/bash
file='/etc/list.txt'
while read line; do
echo $line
if ssh root@$line "stat /var >... (2 Replies)
Discussion started by: nashrik
2 Replies
2. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
3. Shell Programming and Scripting
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
4. Shell Programming and Scripting
i have a scenario where in i have to monitor jobs which run in different servers, The job details(job name, host server, etc) are present in a dat file.
I have written a script a script which reads the details from the dat file and calls a local method where the job monitoring logic is present.... (2 Replies)
Discussion started by: abubucker0
2 Replies
5. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
6. Shell Programming and Scripting
The scope of the shell/perl script is to read the input text file. Validate the expiry date of each certificate and send the mail to the user. The user takes action to add the new certificate to the storage file and user owns the responsibility to update the input text file with the new certificate... (5 Replies)
Discussion started by: casmo
5 Replies
7. Shell Programming and Scripting
Hi Everyone.
I am new in this scripting world. I need to know about script that I can use on linux/sun operating systems. I have 2 input file.
File 1: Its has an header information and then data in 2 different columns.
File 2 : It has data in 9 different columns/
I need an script that... (3 Replies)
Discussion started by: syahmed
3 Replies
8. UNIX for Dummies Questions & Answers
Hiii
I wanna a read a line of text from standard input. The user enter data like this way
name phone_no month1_salary month2_salary
that is user enter the name ,phone no and salary of 2 months in a single line by giving spaces. I wanna add the 3rd and 4th fields ...ie add both... (4 Replies)
Discussion started by: krishnampkkm
4 Replies
9. UNIX for Dummies Questions & Answers
echo "enter employee #:/c"
read employee
grep -w $employee /tmp/file.txt
when it asked me employee #, i typed employee, worked fine.
when it asked me employee #, i type ENTER, it just sit there.
if someone type in NULL or ENTER key, i want to exit out. (2 Replies)
Discussion started by: tjmannonline
2 Replies
10. Shell Programming and Scripting
Hi,
how can i do to show when i do with scrip list entris, or list specific entry, it show 2 lines when i specify the entry to search...¿?
i paste the script:
# Global variables
film=/opt/etc/film/film.txt
export film
confirm()
{
echo -en "$@"
read ans
ans=`echo $ans | tr... (0 Replies)
Discussion started by: dorek
0 Replies