Read file lines and pass line values as arguments.
Dears,
Need help to implement below requirement
A file (detail.txt)contain :
Need to write a script where it read each line of the file.
Check the status column (0 Not active, 1 active)
then pass as following column values as an argument.
stream
pathaddress
counterlimit on below script.
detail.txt contains:
Regards,
sadique
Last edited by jim mcnamara; 11-16-2017 at 09:33 AM..
Reason: quote tags changed to CODE tags
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)
Hi one & All ,
My Need is to Create 64 Partition and create File System in Linux.
I have the Script ...
for((a=0;a<=63;a++))
do
fdisk /dev/cciss/c0d$a
done
for((a=0;a<=63;a++))
do
mkfs.ext2 /dec/cciss/'c0d'$a'p1'
done
the moment I run the Script I get the Prompt ...
Command... (1 Reply)
I am trying to pass max as a sommand line argument when I call awk.
Made the modification in the BEGIN but it is not working
I'm getting an error as below:
awk: txsrx.awk:82: (FILENAME=jcd.tx FNR=4161) fatal: cannot open file `40' for reading (No such file or directory)
Somehow it... (2 Replies)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Hi,
I am writting a script. i am not sure what i am trying to do is possible or not. thats why asking the best of the best.
the script i want to write will recieve as input parameters 2 different options.
as in
MODE 1
-- start_date / end_date (2 dates has 2 go at a time
MODE 2... (2 Replies)
Hi, I need some help with a script I'm trying to write. I have a log file containing references to a number of different webservices. I wish to write a script that will list the webservices with a count as to how many times they appear in the log.
An example of the log file content:
... (2 Replies)
hi,
I am new in the shell script, and c programming with linux. I am looking to pass the arguments in c program that should be executed by the shell script.
e.g.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv)
{ int i;
for (i=1;i<argc; i++)
{
... (2 Replies)
I need to develop a script where I will take two date arguments as parameter date1 and date2 which will in format YYYYMM.
Below is the input file say sample.txt.
sample.txt will have certain blocks starting with P1.
Each block will have a value 118,1:TIMESTAMP.
I need to compare the... (7 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
#!/bin/awk -f
BEGIN {
FS=":";
}
{
if ( $7 == "" ) {
print $1 ": no password!";
}
}
I want to execute this program for a particular user to check for his password from the file /etc/passwd (as the input file) and the user details to be given... (1 Reply)