Sponsored Content
Top Forums Shell Programming and Scripting SED Search in YouTube file not working. Post 302435861 by Christoph Spohr on Thursday 8th of July 2010 10:52:54 AM
Old 07-08-2010
Hi,

to download youtube-videos from the commandline use cclive.

Your line:
Code:
vidid=`cat $file | grep "fmt_url_map" | sed "s/'/\n"  | sed "s/"/\n" > youtube2.html

can be simplified to:
Code:
vidid=$(sed -n "/fmt_url_map/{s/[\'\"]/\n/g;p}"  $file > youtube2.html)

HTH Chris

Last edited by Christoph Spohr; 07-08-2010 at 11:57 AM.. Reason: Mistake
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to search and replace a particular line in file with sed command

Hello, I have a file and in that, I want to search for a aprticular word and then replace another word in the same line with something else. Example: In file abc.txt, there is a line <host oa_var="s_hostname">test</host> I want to search with s_hostname text and then replace test with... (2 Replies)
Discussion started by: sshah1001
2 Replies

2. Shell Programming and Scripting

Awk/Sed: Search Pattern from file and Print

Hi, I want to search for patterns (from a file) in a file and print the line matching the patterns and the line before it. I have to search for 100s of patterns from a file. Any help with AWK or Sed. Thanks! (2 Replies)
Discussion started by: saint2006
2 Replies

3. Shell Programming and Scripting

sed help - search/copy from one file and search/paste to another

I am a newbie and would like some help with the following - Trying to search fileA for a string similar to - AS11000022010 30.4 31.7 43.7 53.8 60.5 71.1 75.2 74.7 66.9 56.6 42.7 32.5 53.3 I then want to replace that string with a string from fileB - ... (5 Replies)
Discussion started by: ncwxpanther
5 Replies

4. Shell Programming and Scripting

Sed emptying file when i use for search replace operation

Hi Friends I am new to sed programming , i found that the below code can search for the $ToSearch and Replace it with $ToReplace ( $ToSearch and $ToReplace are my variables in my script ) sed "s/$ToSearch/$ToReplace/" $file > $output mv $output $file In testing the script i found that... (3 Replies)
Discussion started by: rakeshkumar
3 Replies

5. Shell Programming and Scripting

Search pattern within file using sed..

Hi, Could someone help me in figuring out a way using which i can search for a specific pattern. Eg. JUSTDOIT..I have to print just the word "DO" from "JUSTDOIT" If the same word JUSTDOIT is print n number of times (6 Replies)
Discussion started by: sankasu
6 Replies

6. Shell Programming and Scripting

sed and awk not working on a large record file

Hi All, I have a very large single record file. abc;date||bcd;efg|......... pqr;stu||record_count;date when i do wc -l on this file it gives me "0" records, coz of missing line feed. my problem is there is an extra pipe that is coming at the end of this record like... (6 Replies)
Discussion started by: Gurkamal83
6 Replies

7. Shell Programming and Scripting

Search and replace is not working by sed or awk

Hi , I have one file and in this file i have one like TEST1 KEY0=AAC040R1;AAC041R1ISE;AAC041R2ISE;AAC370R1;ADR0500;ADR0600;AME245R1;AME245R2;BAP0135;BAP0300;PPINVDTD*;PPJERPTD*;PPJERPT*;PRBSUMM*;: i want to replace this line with the following line TEST1... (4 Replies)
Discussion started by: ashissau
4 Replies

8. Shell Programming and Scripting

sed to search and replace - iterating on a file

Hi, I am new to sed scriping but do have some basic scripting skills. I have a properties file props.conf with name/value pairs written in it. Sample is Name1=test Name2=notest Then I have a template file (can be xml or simple text) which will have 'keys' embedded in it. Keys can... (2 Replies)
Discussion started by: tigerinopen
2 Replies

9. Shell Programming and Scripting

sed command not working for me to change text in a file

UNIX gurus I need your help with the following (The server is an AIX box). I have a text file with the following information: ******************************************************** SOME LINES case :WORD1 SOME LINES :WORD2 SOME LINES :WORD3 SOME LINES esac SOME LINES... (7 Replies)
Discussion started by: curiousmal
7 Replies

10. What is on Your Mind?

YouTube: Search Engine Optimization | How To Fix Soft 404 Errors and A.I. Tales from Google Search

Getting a bit more comfortable making quick YT videos in 4K, here is: Search Engine Optimization | How To Fix Soft 404 Errors and A.I. Tales from Google Search Console https://youtu.be/I6b9T2qcqFo (0 Replies)
Discussion started by: Neo
0 Replies
FS_APROPOS(1)						       AFS Command Reference						     FS_APROPOS(1)

NAME
       fs_apropos - Displays each help entry containing a keyword string

SYNOPSIS
       fs apropos -topic <help string> [-help]

       fs ap -t <help string> [-h]

DESCRIPTION
       The fs apropos command displays the first line of the online help entry for any fs command that has in its name or short description the
       string specified by the -topic argument.

       To display the syntax for a command, use the fs help command.

OPTIONS
       -topic <help string>
	   Specifies the keyword string to match, in lowercase letters only.  If the string is more than a single word, surround it with double
	   quotes ("") or other delimiters.

       -help
	   Prints the online help for this command. All other valid options are ignored.

OUTPUT
       The first line of a command's online help entry names it and briefly describes its function. This command displays the first line for any
       fs command where the string specified with the -topic argument is part of the command name or first line.

EXAMPLES
       The following command lists all fs commands that include the word "cache" in their names or short online descriptions:

	  % fs apropos cache
	  setcachesize: set cache size
	  flush: flush file from cache
	  getcacheparms: get cache usage info
	  monitor: set cache monitor host address

PRIVILEGE REQUIRED
       None

SEE ALSO
       fs(1), fs_help(1)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							     FS_APROPOS(1)
All times are GMT -4. The time now is 04:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy