I'm new to unix and the command line and am trying to learn different commands. I have a file (teledir.txt) that contains a name and phone number for 3 different people. I am writing a script that is to take two positional parameters and I typed out how it should behave:
I declared two variables: name=$1 and number=$2. But I'm lost on what command to use in the script to see if the name and/or number exists in the other file.
Hi All,
Has been a while since I was last on, so I hope everyone has been doing fine. ;)
Would like to know if the below IF statement syntax is correct for a ksh environment. It's been pushed into live as someone had deleted the development copy(!); not withstanding that, the statement now... (3 Replies)
Hi,
Can you please help me with this one: I write an "if" statement, something like this:
if
then
echo "big file"
else
echo "normal file"
and I get an error: `'then is not expected
Thanks in advance (6 Replies)
Hi, can someone please tell me what is wrong with this code? I just want it to check if the file size is greater than 2000kb.
if
Thanks!
---------- Post updated at 09:23 PM ---------- Previous update was at 09:21 PM ----------
I should probably post the full code:
#!/bin/sh... (9 Replies)
I'm working on a function in a shell script I'm writing that will eventually take in and print out a list of vendor names and aliases (for my work) Here's the function in question:
addvendorandalias ()
{
echo
echo -n 'Would you like to create a new vendor list (y or n)? '
read answer... (3 Replies)
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
<statement>
else
<statement>
fi
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Hi,
Is there a way to compare the value in if condition with a list of values.
eg . if ]
then
echo "it's a mammal"
else
echo "its not"
fi
Thanks! (8 Replies)
Hi
Can you please tell me what is wrong with this line:
if && ]; then
basically i want to check if x = 12 and F (Filename) end with 'g'. But it is throwing syntax error. (7 Replies)
I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values
tstmb.sh: 1.5321e+08: 0403-057 Syntax error
Below is my code snippet.
#!/bin/ksh
set -x
TODAY=$(date +%y%m%d)
for file in $(ls -rt *.log | tail... (11 Replies)
I want to make the file test condition a variable ($Prmshn in code below).
My goal is to use something like the first three unsuccessful if statetments since the 'if
#!/bin/ksh
test_input()
{
Prmshn=${1}
InFLNm=${2}
ifReq="-$Prmshn $InFLNm"
#the following three if statments fail:
#if ] ;... (10 Replies)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
LEARN ABOUT DEBIAN
webservice::youtube::feeds
WebService::YouTube::Feeds(3pm) User Contributed Perl Documentation WebService::YouTube::Feeds(3pm)NAME
WebService::YouTube::Feeds - Perl interface to YouTube RSS Feeds
VERSION
This document describes WebService::YouTube::Feeds version 1.0.3
SYNOPSIS
use WebService::YouTube::Feeds;
my $feeds = WebService::YouTube::Feeds->new( { ua => '...' } );
my @videos = $feeds->tag($tag);
my @videos = $feeds->user($user);
my @videos = $feeds->recently_added;
my @videos = $feeds->recently_featured;
my @videos = $feeds->top_favorites;
my @videos = $feeds->top_rated;
my @videos = $feeds->most_discussed_month;
my @videos = $feeds->most_discussed_today;
my @videos = $feeds->most_discussed_week;
my @videos = $feeds->top_viewed;
my @videos = $feeds->top_viewed_month;
my @videos = $feeds->top_viewed_today;
my @videos = $feeds->top_viewed_week;
DESCRIPTION
This is a Perl interface to YouTube RSS Feeds.
See About RSS <http://youtube.com/rssls> for details.
SUBROUTINES /METHODS
new( \%fields )
Creates and returns a new WebService::YouTube::Feeds object. %fields can contain parameters enumerated in "ACCESSORS" section.
parse_rss($rss)
Parses RSS and returns the result. $rss should be an object that XML::Simple can understand.
tag( $tag )
Returns an array of WebService::YouTube::Video object. $tag is a keyword string separated by a space.
See <http://youtube.com/rssls> for details.
user( $user )
Returns an array of WebService::YouTube::Video object. $user is an username.
See <http://youtube.com/rssls> for details.
recently_added( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
recently_featured( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
top_favorites( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
top_rated( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
most_discussed_month( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
most_discussed_today( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
most_discussed_week( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
top_viewed( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
top_viewed_month( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
top_viewed_today( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
top_viewed_week( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/rssls> for details.
ACCESSORS
ua
LWP::UserAgent object
DIAGNOSTICS CONFIGURATION AND ENVIRONMENT
WebService::YouTube::Feeds requires no configuration files or environment variables.
DEPENDENCIES
HTTP::Date, LWP::UserAgent, XML::Simple, WebService::YouTube::Util, WebService::YouTube::Video
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to "bug-webservice-youtube@rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-YouTube>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
AUTHOR
Hironori Yoshida <yoshida@cpan.org>
LICENSE AND COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
perl v5.10.1 2010-08-01 WebService::YouTube::Feeds(3pm)