Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Get the last value in the input stream Post 302341634 by qasim on Thursday 6th of August 2009 09:57:26 AM
Old 08-06-2009
Get the last value in the input stream

Hello Everyone,
The situation is:
Code:
$ alias rm="sh abc.sh"

Code:
#abc.sh:
read input
echo "The input was: " $input

Code:
$ rm xyz.txt

should return
"The input was: xyz.txt"

Here, I want the alias "rm" to execute the file "abc.sh", where "abc.sh" should take "xyz.txt" as "input" and echo the desired information(without using sed or awk).
Kind Regards,
Qasim

Last edited by qasim; 08-06-2009 at 11:00 AM.. Reason: improve readability
 

9 More Discussions You Might Find Interesting

1. Programming

stream output??

Hi all, I've a structure let's say typdef struct a { int a; int b; char* string} b; I need to make the function smth like readdir(), returning everytime it's called pointer to the next structure. Let's say functions would read the next file in the directory and all the permitions put it in... (2 Replies)
Discussion started by: solvman
2 Replies

2. UNIX for Dummies Questions & Answers

Stream MP3s

What is a good and easy to set up program on Unix FreeBSD for playing streaming MP3s. Where can I get it and how do I install it? This is FreeBSD 4.3. Thanx. (2 Replies)
Discussion started by: ByondF1
2 Replies

3. Programming

File I/O Stream

Hi All, I am trying to read data from two files and then compare them and only print the records on the screen that have a same ID.i.e TAGNO =CUSTOMERNO For Eg My Input Files are (a) Transaction (b) Customer detail The data in file a is like: TagNo Date Time Station... (0 Replies)
Discussion started by: rooh
0 Replies

4. UNIX for Advanced & Expert Users

the stream edditor

:D i have searched through several sites on google for a match up for sed that would go indepth into the workings of this interactive edditor.. I use it every day and it is the edditor of my choice so i know a few tricks but would very much like to get into the more complex uses of sed.. all the... (2 Replies)
Discussion started by: moxxx68
2 Replies

5. Solaris

change priority of stream

Is it possible to change priority of stream process ? Original source: stream ./javawebserver Desired change is kind of: nice --10 of (stream ./javawebserver) (2 Replies)
Discussion started by: gogogo
2 Replies

6. Shell Programming and Scripting

Using Awk for stream log

Hi Master, I've log in here then try parsing log become : 3GPP-IMSI,Calling-Station-Id 528111500111614,6738790448 528111500068173,6738769831 ..... it is possible to use awk? cause i 've try awk ' /\Accounting\ /{f=1} f && /\3GPP-IMSI \:\ String Value\ /{imsi=$4} f &&... (1 Reply)
Discussion started by: bowbowz
1 Replies

7. Ubuntu

Stream video

Hello, I have Ubuntu 64 bit 9.04 install dual boot I can't see stream videos through Opera I couldnt see it in Firefox did this: "sudo apt-get install ubuntu-restricted-extras flashplugin-nonfree" Now I can see it in firefox but not in Opera Should not care and just use just Firefox. thanks (0 Replies)
Discussion started by: Pitroadrush
0 Replies

8. Shell Programming and Scripting

[Video stream] network stream recording with mplayer

Hi I used this command: mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \ -cache 1024 -fps 25.0 -nosound -vc ffh264 \ -demuxer 3 -dumpstream -dumpfile output.avi It's ok but... Video Playing is very fast! Why? Is it a synch problem? What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies

9. Shell Programming and Scripting

Creating a file from input stream

Hi, Need some help with creating a file from input steam. Meaning from following command myfunc should be able to store the input stream to a file. echo a b c | myfunc The file thus created should have - a b c Here's what I've tried in myfunc() but didn't help - myfunc() { cat... (3 Replies)
Discussion started by: nexional
3 Replies
Locale::Codes::LangFam(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangFam(3pm)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangFam(3pm)
All times are GMT -4. The time now is 07:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy