Sponsored Content
Full Discussion: argument
Top Forums Shell Programming and Scripting argument Post 302526995 by ctsgnb on Thursday 2nd of June 2011 04:33:58 AM
Old 06-02-2011
another example
Code:
$ cat crap.html
<whatever>blabla</whatever>
<whatever>blgjfdklsklla</whatever>
<whatever>blaa</whatever>
<whatever>blakgjfmldbla</whatever>
<whatever>blablgjfdlka</whatever>

$ cat s
sed 's/<[^>]*>//g' $1 | uniq | tee newfile.txt

$ sh s crap.html
blabla
blgjfdklsklla
blaa
blakgjfmldbla
blablgjfdlka

$ cat newfile.txt
blabla
blgjfdklsklla
blaa
blakgjfmldbla
blablgjfdlka

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

argument help

if i have 2 arguments $1 and $2 how can i append them so that $2 is added to $1? It is really confusing me because it seems so simple, yet i can't get the shell script to work properly. Thanks. (2 Replies)
Discussion started by: brentdeback
2 Replies

2. Shell Programming and Scripting

argument parsing...

Hi all, Iam a beginer in shell scripting. i need a script that can parse the arguments and store them in variables. ex: ./myScript -v v1 -h v2 -c v3...... can someone suggest me...? tnx in adv. (1 Reply)
Discussion started by: midhun_u
1 Replies

3. Shell Programming and Scripting

Stripped argument

Hi there Has anyone seen this behaviour before, and if so, do they know why this happens? I am running this in BASH: $ export DEV="/usr/sbin/diskutil list | /usr/bin/grep Master | /usr/bin/awk '{ print $6 }'" $ echo $DEV /usr/sbin/diskutil list | /usr/bin/grep Master | /usr/bin/awk '{ print... (4 Replies)
Discussion started by: mikie
4 Replies

4. UNIX for Dummies Questions & Answers

How to find the last argument in a argument line?

How to find the last argument in a argument line? (4 Replies)
Discussion started by: nehagupta2008
4 Replies

5. Shell Programming and Scripting

get positive number n as argument script must calculate the factorial of its argument

Can someone please help me with this SHELL script? I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1. Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies

6. Shell Programming and Scripting

Cannot compare argument in if statement in csh/grep command if argument starts with “-“

If ($argv == “-debug”) then Echo “in loop” Endif But this is not working. If I modify this code and remove “-“, then it works. Similarly I am getting problem using grep command also Grep “-debug” Filename Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies

7. Shell Programming and Scripting

Make script that run with argument if not run from configuration file argument

Hello, Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file i.e I am workiing on a script which will run through crontab and the script will chekout the code ,zip and copy to the... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies

8. UNIX for Advanced & Expert Users

Error:--test: argument expected--Even though i give an argument.

Hi All, I am running the script VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt result=`cat har1out.mytxt | grep $1' echo $result echo $1 { if then echo pass else echo fail fi (2 Replies)
Discussion started by: harsha85
2 Replies

9. Programming

Java argument help

Hello All, I have the following code, package com.java.tutorial.examples; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class Swapping {... (0 Replies)
Discussion started by: jacobs.smith
0 Replies

10. Shell Programming and Scripting

How to substitute one argument into another?

Hello Friends, I am not able to solve something which looks silly..after spending some time around it, thought of positing it here. I want to get $2, $3... into user. but I want to control the sequence by count. I want to assign $2 user..then $3 to user..then $4 to user etc. how can I... (4 Replies)
Discussion started by: venkat4tech
4 Replies
LR_ENVIRONMENT.IN(1)					  LogReport's Lire Documentation				      LR_ENVIRONMENT.IN(1)

NAME
lr_environment - Export Lire configuration in shell script form SYNOPSIS
eval `lr_environment` DESCRIPTION
The lr_environment command is used to import the Lire configuration in Lire shell scripts. All of Lire configuration variables will be written in a format that can be evaled by the shell. Shell scripts don't usually have to use that command, since it is done by the defaults file sourced by each command. The old names used by when the configuration was done in shell script are also exported by this script for backward compatibility. AUTHOR
Francis J. Lacoste <flacoste@logreport.org> VERSION
$Id: lr_environment.in,v 1.12 2006/07/23 13:16:33 vanbaal Exp $ COPYRIGHT
Copyright (C) 2003 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 LR_ENVIRONMENT.IN(1)
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy