Sponsored Content
Full Discussion: multiple operation
Top Forums Shell Programming and Scripting multiple operation Post 55041 by nattynatty on Tuesday 31st of August 2004 11:26:23 PM
Old 09-01-2004
See if this works for you:

$ more dup_test
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
DESCRIPTION="ABC MNCL JHDG "
DESCRIPTION="ABC MNCL JHDG "
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
$ sed -e '$!N; /^\(.*\)\n\1$/!P; D' dup_test
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
OBJECT="ABC" GFT="JHU"
DESCRIPTION="ABC MNCL JHDG "
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

split operation

Hello, How to undo split operation ? (1 Reply)
Discussion started by: scotty_123
1 Replies

2. Shell Programming and Scripting

Help with arithmetic operation

I am using egrep to extract numbers from a file and storing them as variables in a script. But I am not able to do any arithmetic operations on the variables using "expr" because it stores them as char and not integers. Here is my code and the error I get. Any help will be appreciated. #!/bin/sh... (3 Replies)
Discussion started by: emjayshaikh
3 Replies

3. Shell Programming and Scripting

string operation

i am new user of unix.i have a question.My script is- export STR_ALFA=`head -2 "${FILE_PATH}"|tail -1|cut -d"," -f1` "${TEST_HOME}"/function/chk_alfa.ksh STR_ALFA now i want to check STR_ALFA: 1)whether is alphabetic 2)whether is numeric 3)whether is alphanumeric... (1 Reply)
Discussion started by: arghya_owen
1 Replies

4. Shell Programming and Scripting

Column operation : cosne and sine operation

I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file . file.txt 900.00000 1 1 1 500.00000 500.00000 100000.000 4 4 1.45257346E-07 899.10834 ... (4 Replies)
Discussion started by: shashi792
4 Replies

5. What is on Your Mind?

Modems still in operation?

Does anyone still use modems for anything? Every now and then I see a web site that offers low res video for dial-up users. I wonder if any dial-up users still exist. But even if you have a wide band Internet connection,you might still use a modem for something else. For the purposes of this... (13 Replies)
Discussion started by: Perderabo
13 Replies

6. Shell Programming and Scripting

[Solved] Mathematical operation in multiple files

Hi experts, I need to do a mathematical calculation between each data in 3 different files. Output is using formula (A11+B11)/(1+C11). INPUT : File A.txt A11 A12 A21 A22 File B.txt B11 B12 B21 B22 File C.txt C11 C12 C21 C22 OUTPUT: (A11+B11)/(1+C11) (A12+B12)/(1+C12)... (3 Replies)
Discussion started by: guns
3 Replies

7. Shell Programming and Scripting

Operation on multiple files

I have four files that look like this: file_1: a b c d e f file_2: g h i j k l file_3: m n o p q r (4 Replies)
Discussion started by: kayak
4 Replies

8. Shell Programming and Scripting

If then else - Retry operation

I need to read a file line by line, then depending on the contents of each line, type in a code that will get written to an array. The problem I have is when I ask the user to confirm the input code, if it is wrong, how do i Return to ask again? Any thing I try increments the file to the next... (6 Replies)
Discussion started by: kcpoole
6 Replies

9. Shell Programming and Scripting

Multiple Replacement in a Text File in one operation (sed/awk) ?

Hi all, Saying we have two files: 1. A "Reference File" whose content is "Variable Name": "Variable Value" 2. A "Model File" whose content is a model program in which I want to substitute "VariableName" with their respective value to produce a third file "Program File" which would be a... (4 Replies)
Discussion started by: dae
4 Replies

10. Shell Programming and Scripting

Do replace operation and awk to sum multiple columns if another column has duplicate values

Hi Experts, Please bear with me, i need help I am learning AWk and stuck up in one issue. First point : I want to sum up column value for column 7, 9, 11,13 and column15 if rows in column 5 are duplicates.No action to be taken for rows where value in column 5 is unique. Second point : For... (12 Replies)
Discussion started by: as7951
12 Replies
UDISKSCTL(1)							   User Commands						      UDISKSCTL(1)

NAME
udisksctl - The udisks command line tool SYNOPSIS
udisksctl status udisksctl info {--object-path OBJECT | --block-device DEVICE} udisksctl mount {--object-path OBJECT | --block-device DEVICE} [--filesystem-type TYPE] [--options OPTIONS...] [--no-user-interaction] udisksctl unmount {--object-path OBJECT | --block-device DEVICE} [--force] [--no-user-interaction] udisksctl unlock {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl lock {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl loop-setup --file PATH [--read-only] [--offset OFFSET] [--size SIZE] [--no-user-interaction] udisksctl loop-delete {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl smart-simulate --file PATH {--object-path OBJECT | --block-device DEVICE} [--no-user-interaction] udisksctl monitor udisksctl dump udisksctl help DESCRIPTION
udisksctl is a command-line program used to interact with the udisksd(8) daemon process. COMMANDS
status Shows high-level information about disk drives and block devices. info Shows detailed information about OBJECT or DEVICE. mount Mounts a device. The device will be mounted in a subdirectory in the /media hierarchy - upon successful completion, the mount point will be printed to standard output. The device will be mounted with a safe set of default options. You can influence the options passed to the mount(8) command with --options. Note that only safe options are allowed - requests with inherently unsafe options such as suid or dev that would allow the caller to gain additional privileges, are rejected. unmount Unmounts a device. This only works if the device is mounted. The option --force can be used to request that the device is unmounted even if active references exists. unlock Unlocks an encrypted device. The passphrase will be requested from the controlling terminal and upon successful completion, the cleartext device will be printed to standard output. lock Locks a device. This only works if the device is a cleartext device backed by a cryptotext device. loop-setup Sets up a loop device backed by FILE. loop-delete Tears down a loop device. smart-simulate Sets SMART data from the libatasmart blob given by FILE - see /usr/share/doc/libatasmart-devel-VERSION/ for blobs shipped with libatasmart. This is a debugging feature used to check that applications act correctly when a disk is failing. monitor Monitors the daemon for events. dump Prints the current state of the daemon. help Prints help and exit. COMMON OPTIONS
The option --no-user-interaction can be used to request that no interaction (such as the user being presented with an authentication dialog) must occur when checking with polkit(8) whether the caller is authorized to perform the requested action. AUDIENCE
This program does not assume that the caller is the super user - it is intended to be used by unprivileged users and authorizations are checked by the udisks daemon using polkit(8). Additionally, this program is not intended to be used by scripts or other programs - options/commands may change in incompatible ways in the future even in maintenance releases. See the "API STABILITY" section of udisks(8) for more information. BASH COMPLETION
udisksctl ships with a bash completion script to complete commands, objects, block devices and some options. AUTHOR
Written by David Zeuthen <zeuthen@gmail.com> with a lot of help from many others. BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at http://bugs.freedesktop.org/enter_bug.cgi?product=udisks. SEE ALSO
udisks(8), udisksd(8), umount.udisks2(8), polkit(8) udisks 2.1.2 March 2013 UDISKSCTL(1)
All times are GMT -4. The time now is 10:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy