10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
I am trying to write a case condition for database backups.But I am unable to make the script to read input from command line .
while true ;do
read -p "Do You Wish To Take Database Backup ?? " yn
case $yn in
*) echo " YES take backup ";;
*) echo " NO BACKUP " ;;
... (9 Replies)
Discussion started by: rocking77
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
4. Shell Programming and Scripting
Input are file and file1
store.bal.... (2 Replies)
Discussion started by: veeruasu
5. Shell Programming and Scripting
I want to write a small code in which script changes command line input to some form.
script.sh a1 a2 a3 a4 .....
output should be "a1|a2|a3|....."
Number of inputs in command line can be any variable (2 Replies)
Discussion started by: Raza Ali
6. UNIX for Dummies Questions & Answers
1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes?
2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
7. Shell Programming and Scripting
Being new to awk I have a really basic question. It just has to be in the archives but it didn't bite me when I went looking for it.
I've written an awk script, placed it in a file, added the "#!/usr/bin/awk -f" at the top of the script and away I go. "% myAwk <inputfile>" gives me exactly what... (2 Replies)
Discussion started by: tomr2k
8. Shell Programming and Scripting
I have two files.
text string one
text string two
text string three
I would like to use sed to read each line of file one and put it at the end of the summary line of file... (3 Replies)
Discussion started by: dolacap
9. Shell Programming and Scripting
I wish to automate the unix command 'su' through a shell script.
I would like to pass the content of a file as password to 'su' command.
My script is as below,
while read line
rpm -ivh $line
done < pwd.txt
where pwd.txt contains the password of... (6 Replies)
Discussion started by: little_wonder
10. Shell Programming and Scripting
Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names.
My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
Discussion started by: sajjad02