Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Inserting shell script input data automatically from a text file Post 302965154 by mohamadreza on Sunday 24th of January 2016 07:47:47 AM
Old 01-24-2016
I appreciate the time you have put into detailing these requirements. Thank you.

Its working.

Best
Mohamad
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to input username on text file into finger command on shell script

I'm trying to clean up my server and I have the list of some "special" users stored on the text file like this Now I want to write a shell script to finger all of them so I can have some kind of ideas who they are but here comes the problem....I completely forgot how to do it with shell... (3 Replies)
Discussion started by: Micz
3 Replies

2. Shell Programming and Scripting

Using Shell Script to get data from text file

Hello, I have got the script below that reads a text file and then extract data from the third column and then send the result to another shell scrpt call tsim - the script works fine. The problem I am having is that I want the user to enter the 'Test Day' which the first column in the text file,... (1 Reply)
Discussion started by: jermaine4ever
1 Replies

3. Shell Programming and Scripting

how to use data in unix text file as input to an sql query from shell

Hi, I have data in my text file something like this. adams robert ahmed gibbs I want to use this data line by line as input to an sql query which i run by connecting to an oracle database from shell. If you have code for similar scenario , please ehlp. I want the output of the sql query... (7 Replies)
Discussion started by: rdhanek
7 Replies

4. Shell Programming and Scripting

How to read the data from the text file in shell script?

I am having one text file and i need to read that data from my shell script. I will expain you the scenario: Script look like: For name type 1: For age type 2: For Salary type3: echo "Enter the input:" read the data if input is 1 then go to the Text file and print the... (2 Replies)
Discussion started by: dineshmurs
2 Replies

5. Shell Programming and Scripting

shell script to take input from a text file and perform check on each servers and copy files

HI all, I want to script where all the server names will be in a text file like server1 server2 server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 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

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

Need help on inserting data from text file to excel using shell script

Hi, Please help me on this. I want to insert data from text file to excel using shell script nawk -v r=4 -v c=4 -v val=$a -F, 'BEGIN{OFS=","}; NR != r; NR == r {$c = val; print}' "file.csv" I used above one to insert $a value in 4th row, 4th column in an excel file.csv and it... (3 Replies)
Discussion started by: suman.frnz
3 Replies

8. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

9. Shell Programming and Scripting

How to get the shell script to read the .txt file as an input/data?

i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies

10. UNIX for Beginners Questions & Answers

Need list of input and output parameter of task in a text file, using shell script

//file begin ===== //some code task abcd_; input x; input y,z; //some comment output w; //some comment reg p; integer q; begin //some code end endtask : abcd_ //some code //file end ===== expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
SVN_STATUS(3)								 1							     SVN_STATUS(3)

svn_status - Returns the status of working copy files and directories

SYNOPSIS
array svn_status (string $path, [int $flags]) DESCRIPTION
Returns the status of working copy files and directories, giving modifications, additions, deletions and other changes to items in the working copy. PARAMETERS
o $path - Local path to file or directory to retrieve status of. Note Relative paths will be resolved as if the current working directory was the one that contains the PHP binary. To use the calling script's working directory, use realpath(3) or dirname(__FILE__). o $flags - Any combination of SVN_NON_RECURSIVE, SVN_ALL (regardless of modification status), SVN_SHOW_UPDATES (entries will be added for items that are out-of-date), SVN_NO_IGNORE (disregard svn:ignore properties when scanning for new files) and SVN_IGNORE_EXTERNALS. RETURN VALUES
Returns a numerically indexed array of associative arrays detailing the status of items in the repository: Array ( [0] => Array ( // information on item ) [1] => ... ) The information on the item is an associative array that can contain the following keys: o $path - String path to file/directory of this entry on local filesystem. o $text_status - Status of item's text. Refer to status constants for possible values. o $repos_text_status - Status of item's text in repository. Only accurate if $update was set to TRUE. Refer to status constants for possible values. o $prop_status - Status of item's properties. Refer to status constants for possible values. o $repos_prop_status - Status of item's property in repository. Only accurate if $update was set to TRUE. Refer to status constants for possible val- ues. o $locked - Whether or not the item is locked. (Only set if TRUE.) o $copied - Whether or not the item was copied (scheduled for addition with history). (Only set if TRUE.) o $switched - Whether or not the item was switched using the switch command. (Only set if TRUE) These keys are only set if the item is versioned: o $name - Base name of item in repository. o $url - URL of item in repository. o $repos - Base URL of repository. o $revision - Integer revision of item in working copy. o $kind - Type of item, i.e. file or directory. Refer to type constants for possible values. o $schedule - Scheduled action for item, i.e. addition or deletion. Constants for these magic numbers are not available, they can be emulated by using: <?php if (!defined('svn_wc_schedule_normal')) { define('svn_wc_schedule_normal', 0); // nothing special define('svn_wc_schedule_add', 1); // item will be added define('svn_wc_schedule_delete', 2); // item will be deleted define('svn_wc_schedule_replace', 3); // item will be added and deleted } ?> o $deleted - Whether or not the item was deleted, but parent revision lags behind. (Only set if TRUE.) o $absent - Whether or not the item is absent, that is, Subversion knows that there should be something there but there isn't. (Only set if TRUE.) o $incomplete - Whether or not the entries file for a directory is incomplete. (Only set if TRUE.) o $cmt_date - Integer Unix timestamp of last commit date. (Unaffected by $update.) o $cmt_rev - Integer revision of last commit. (Unaffected by $update.) o $cmt_author - String author of last commit. (Unaffected by $update.) o $prop_time - Integer Unix timestamp of last up-to-date time for properties o $text_time - Integer Unix timestamp of last up-to-date time for text NOTES
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. EXAMPLES
Example #1 Basic example This example demonstrates a basic, theoretical usage of this function. <?php print_r(svn_status(realpath('wc'))); ?> The above example will output something similar to: Array ( [0] => Array ( [path] => /home/bob/wc/sandwich.txt [text_status] => 8 // item was modified [repos_text_status] => 1 // no information available, use update [prop_status] => 3 // no changes [repos_prop_status] => 1 // no information available, use update [name] => sandwich.txt [url] => http://www.example.com/svnroot/deli/trunk/sandwich.txt [repos] => http://www.example.com/svnroot/ [revision] => 123 [kind] => 1 // file [schedule] => 0 // no special actions scheduled [cmt_date] => 1165543135 [cmt_rev] => 120 [cmt_author] => Alice [prop_time] => 1180201728 [text_time] => 1180201729 ) ) SEE ALSO
svn_update(3), svn_log(3), SVN documentation for svn status. PHP Documentation Group SVN_STATUS(3)
All times are GMT -4. The time now is 06:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy