Sponsored Content
Top Forums Shell Programming and Scripting sed not applying /d "delete line" option Post 302993518 by RudiC on Friday 10th of March 2017 02:42:43 PM
Old 03-10-2017
Well, too bad.
Please abstain from posting screen shots or pictures to show texts like code, output, or error messages. Post the text as is to enable people to copy and use it.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

cat/delete per line any word "192.168.1.12"

Hi All Can u help me.. My problem is delete word per line sample: cat /tmp/file.txt monitor 192.168.1.11 Copying files in current directory 1 monitor 192.168.1.1 Copying files in current directory 2 monitor 192.168.1.12 Copying files in current directory 3 monitor 192.168.1.14... (1 Reply)
Discussion started by: carnegiex
1 Replies

3. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

4. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

5. Shell Programming and Scripting

Delete files older than "x" if directory size is greater than "y"

I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y" #!/bin/bash du -hs $1 while read SIZE ENTRY do if ; then find $1 -mtime +$2 -exec rm -f {} \; echo "Files older than $2 days deleted" else echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

8. Shell Programming and Scripting

Is it possible to use sed to handle the line contains BOTH "AA" and "BB"

if yes, can some expert give an example Lei (2 Replies)
Discussion started by: yanglei_fage
2 Replies

9. Shell Programming and Scripting

Find "*.c" and "Makefile" and then delete them with one line

find "*.c" and "Makefile" and then delete them with one line (3 Replies)
Discussion started by: yanglei_fage
3 Replies

10. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
LEFTY(1)						      General Commands Manual							  LEFTY(1)

NAME
lefty - A Programmable Graphics Editor SYNOPSIS
lefty [ options ] [ file ] DESCRIPTION
lefty is a two-view graphics editor for technical pictures. This editor has no hardwired knowledge about specific picture layouts or edit- ing operations. Each picture is described by a program that contains functions to draw the picture and functions to perform editing opera- tions that are appropriate for the specific picture. Primitive user actions, like mouse and keyboard events, are also bound to functions in this program. Besides the graphical view of the picture itself, the editor presents a textual view of the program that describes the pic- ture. Programmability and the two-view interface allow the editor to handle a variety of pictures, but are particularly useful for pictures used in technical contexts, e.g., graphs and trees. Also, lefty can communicate with other processes. This feature allows it to use exist- ing tools to compute specific picture layouts and allows external processes to use the editor as a front end to display their data struc- tures graphically. USAGE
The file name is optional. It may be -, for reading from standard input. lefty uses two environment variables, LEFTYPATH and LEFTYOPTIONS. LEFTYPATH is a colon separated list of directories. When lefty tries to open a file, it searches that path for the file. When lefty tries to start up another process, it searches LEFTYPATH first, then the standard PATH variable. LEFTYOPTIONS can be used to set specific options. Options specified on the command line override options set through this variable. OPTIONS
-x Instructs the editor to exit after processing file. -e <expression> <expression> is parsed and executed. -el <num> Set error reporting level. The default value is 0. 0 never prints any messages. 1 prints severe errors, such as trying to return from a non function. 2 is the most useful: it reports function calls that cannot be executed, either because there is no function, or because of argument mismatches. 3 also warns about bad variable names. 4,5 warn about expressions that do not return a value. Only level 1 messages are real errors. The rest arise from legal lefty statements, but may be caused by some logic errors. -sd <num> Specifies how much of the stack to show, when an error message is to be printed. The default value is 2. With 0, no part of the stack is shown. With 1, only the top stack frame is printed. With 2, the full stack is printed. -sb <num> Specifies how much of each function in the stack to show, when an error message is to be printed. The default value is 2. With 0, no part of the function is shown. With 1, only the line around the error is printed. With 2, the full function body is printed. -df <string> Sets the default font. This font is used whenever a requested font cannot be found. The string must be a legal X font. If string is '', lefty will draw small boxes instead of text. -ps <file> Specifies a default file name for postscript files. This name is used when no name is specified in the createwidget call. The default file name is out.ps. -V Prints the version. SEE ALSO
lefty user guide. LEFTY(1)
All times are GMT -4. The time now is 06:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy