Sponsored Content
Top Forums Shell Programming and Scripting Passing filename as parameter and displaying the file contents Post 302341565 by radhi2424 on Thursday 6th of August 2009 07:12:52 AM
Old 08-06-2009
Passing filename as parameter and displaying the file contents

Hi All,

Its extremely urgent regarding the following requirement.
I have created few files in a directory. I have write a program in shell scripting such that it prompts for the filename . once the filename is entered,it should print the contents of the file.

Can anyone help with this......... Its extremely urgent.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to adding the filename into file contents

Dear Experts, Please help to teach me how to add the filename into the file content so that i can get the output below:- Actually the file name ***************New output that I want*************** =====2005-11-12===== EVENTS-20050912 03:33:37 ALARM: BTSSPAN-277-1 30-18013... (2 Replies)
Discussion started by: missutoomuch
2 Replies

2. Shell Programming and Scripting

Passing Filename as a Parameter to Another script

Hi, I have a requirement to write a script file(script1.sh) to read the file from the folder say /usr1/profiles/active and pass the file name as a parameter to another script file say (script2.sh) which would subsitute this parameter. The script2.sh will have a line like the one below ... (1 Reply)
Discussion started by: ravisg
1 Replies

3. Shell Programming and Scripting

how to find the path of a file when it is passed as ....filename(parameter) to script

hi unix guru's..................:confused: question is posted in the #3 permalink shown below. (3 Replies)
Discussion started by: yahoo!
3 Replies

4. Shell Programming and Scripting

Passing parameter from one file to shell script

Hi All, I have a 2 files. File1 i am generating using an ETL tool, which is a comman seperated delimited file which contains country code & load date. everytime, this country code will be updated from a table. It might be AB or BA & ld_date will be for which date we need to load the file. ... (7 Replies)
Discussion started by: Amit.Sagpariya
7 Replies

5. Shell Programming and Scripting

split the file based on the 2nd column passing as a parameter

I am unable to spit the file based on the 2nd column passing as a parameter with awk command. Source file: “100”,”customer information”,”10000” “200”,”customer information”,”50000” “300”,”product information”,”40000” script: the command is not allowing to pass the parameters with the awk... (7 Replies)
Discussion started by: number10
7 Replies

6. Shell Programming and Scripting

AT command parameter passing to php file

I have a bash script which utilizes a random function and then runs a file at now plus a random time. The problem is, that the php file requires a parameter after it eg: phpfile.php?code=123245b3 When i put in the file including the full path, with the at command, it will run, but not with... (1 Reply)
Discussion started by: thruxmore
1 Replies

7. Shell Programming and Scripting

Passing file content as parameter

Hi All, I am passing a file value as parameter to awk command; Par.txt A|B Input.txt A,1 B,3 C,4 D,5 My desired output should be A,1 B,3 (4 Replies)
Discussion started by: kmsekhar
4 Replies

8. Shell Programming and Scripting

Passing parameter to script, and split the parameter

i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two if then echo " Usage : <$0> <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi (5 Replies)
Discussion started by: only4satish
5 Replies

9. Shell Programming and Scripting

Passing parameter through file

Hi , I am passing date parameter through file my shell script testing.sh is #set -x #set -v asd=$1 asd1=$2 echo $asd echo $asd1 Passing parameter as below sh testing.sh `cat file1.txt` Output (2 Replies)
Discussion started by: kaushik02018
2 Replies

10. Shell Programming and Scripting

Replace multiple file by passing parameter value

Hello All, I want to change date part in file name to yesterday date in the file name. example file name file-12122017-06-30-41.dat want file-12112017-06-30-41.dat I am doing like below. Below it is not changing the filename. Actually it is not parsing the $today and $yesterday value in... (1 Reply)
Discussion started by: looney
1 Replies
t_look(3)						     Library Functions Manual							 t_look(3)

NAME
t_look() - look at the current event on a transport endpoint SYNOPSIS
DESCRIPTION
The function returns the current event on the transport endpoint specified by fd. This function enables a transport provider to notify a transport user of an asynchronous event when the user is calling functions in synchronous mode. Certain events require immediate notifica- tion of the user and are indicated by a specific error, [TLOOK], on the current or next function to be executed. This function also enables a transport user to poll a transport endpoint periodically for asynchronous events. Valid States All - apart from XTI Internet Protocol-specific Information As soon as a segment with the TCP urgent pointer set enters the TCP receive buffer, the event is indicated. remains set until all data up to the byte pointed to by the TCP urgent pointer has been received. If the urgent pointer is updated, and the user has not yet received the byte previously pointed to by the urgent pointer, the update is transparent to the user. Fork Safety is not fork-safe. RETURN VALUE
Upon success, returns a value that indicates which of the following allowable events has occurred, or returns zero if no event exists. One of the following events is returned: T_LISTEN connection indication received. T_CONNECT connect confirmation received. T_DATA normal data received. T_ERROR (TLI ONLY) fatal error occurred. T_EXDATA expedited data received. T_DISCONNECT disconnect received. T_UDERR datagram error indication. T_ORDREL orderly release indication. T_GODATA (XTI only) flow control restrictions on normal data flow have been lifted. Normal data may be sent again. T_GOEXDATA (XTI only) flow control restrictions on expedited data flow have been lifted. Expedited data may be sent again. ERRORS
On failure, is set to one of the following: [TBADF] The specified identifier does not refer to a transport endpoint. [TSYSERR] A system error has occurred during execution of this function. [TPROTO] (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no suitable XTI ( SEE ALSO
t_open(3), t_snd(3), t_sndudata(3), thread_safety(5). STANDARDS CONFORMANCE
t_look(3)
All times are GMT -4. The time now is 03:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy