07-17-2019
Iterate through a list - checking for a duplicate then report it ot
I have a job that produces a file of barcodes that gets added to every time the job runs
I want to check the list to see if the barcode is already in the list and report it out if it is.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have the files logged in the file system with names in the format of : filename_ordernumber_date_time
eg:
file_1_12012007_1101.txt
file_2_12022007_1101.txt
file_1_12032007_1101.txt
I need to find out all the files that are logged multiple times with same order number. In the above eg, I... (1 Reply)
Discussion started by: sudheshnaiyer
1 Replies
2. Shell Programming and Scripting
I've been working on a script (/bin/sh) in which I have requested and received help here (in which I am very grateful for!). The client has modified their requirements (a tad), so without messing up the script to much, I come once again for assistance.
Here are the file.dat contents:
ABC1... (4 Replies)
Discussion started by: petersf
4 Replies
3. Shell Programming and Scripting
Could someone please point me in the right direction with the following?
I have a program that generates logs that contains sections like this:
IMAGE INPUT
81 0 0.995 2449470 0 1726 368 1 0.0635 0.3291
82 0 1.001 2448013 0 1666 365 1 0.0649 ... (4 Replies)
Discussion started by: euval
4 Replies
4. UNIX for Dummies Questions & Answers
Hi i have a file with one column and want to report the value that has duplicate like
rag
rag
hi
hi
hi
123
456
output should be
rag
hi
thank you (6 Replies)
Discussion started by: thonlun
6 Replies
5. Shell Programming and Scripting
Hey all,,
I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use.
lets say i have a list..
set arr=(x y z e f)
I wanna iterate the list with foreach ,, not with while.!!
foreach i $arr
echo $i
end
does not work (2 Replies)
Discussion started by: eawedat
2 Replies
6. Shell Programming and Scripting
Hi i have a file like
110.10
120.10
-1120
110.10
and the lines are having more than 10k.
do we have anycommand to check the duplicate entries in the file.
I applied the while loop by greping each line with whole file,
but it is taking huge amount of time as the file size is large.
... (5 Replies)
Discussion started by: saluja.deepak
5 Replies
7. UNIX for Dummies Questions & Answers
I am very new to bash scripting and this is my first script.
I am trying to write a script that takes an argument d as the directory.
It looks through the files to find duplicates and delete them.
Here's some sorta-pseudocode but am unsure how to implement it:
#! /bin/bash
#get... (1 Reply)
Discussion started by: shubham92
1 Replies
8. Shell Programming and Scripting
I have a short line of code that checks very rudimentary for duplicate code:
sort myfile.cpp | uniq -c | grep -v "^.*1 " | grep -v "}"
It sorts the file, counts occurrences of each line, removes single occurrences and removes the ubiquitous closing brace. The language is C++, but is easily... (3 Replies)
Discussion started by: figaro
3 Replies
9. UNIX for Dummies Questions & Answers
I need to load an XML file and loop through a list of nodes in it to execute a shell script for each one using the attributes for each node as parameters for the script. Any ideas? Any help will be much appreciated. (1 Reply)
Discussion started by: bradlecat
1 Replies
10. Shell Programming and Scripting
Hi all
I have a big file like this in rows and columns from 2 column onwards the next column is desciption of previous column means 3rd columns is description of 2 columns and 5 column is description of 4 column.
All cloumns are separated by comma
... (1 Reply)
Discussion started by: manigrover
1 Replies
LEARN ABOUT SUSE
vm-install-jobs
vm-install-jobs(8) System Manager's Manual vm-install-jobs(8)
NAME
vm-install-jobs - queries and manages VM creation jobs that were started by vm-install
SYNOPSIS
vm-install-jobs [options ...]
DESCRIPTION
VMs may be created by vm-install interactively, or as backgrounded jobs. The vm-install-jobs command manages backgrounded VM creation
jobs.
OPTIONS
--cancel job-id
Cancels the specified job. If the VM is still running, it is stopped. This command may return before the VM is completely stopped
or the vm-install process has completely exited. The job is not implicitly deleted, so that the cancelation progress may be
observed.
--delete job-id
Deletes the specified job. The job must be in one of the FINISHED, FAILED, or CANCELED states. The VM's configuration is deleted,
as are any disks that were created during the job.
--detach job-id
Detaches the created VM from the specified job. The job must be in the FINISHED state. The job is deleted, but the VM's configura-
tion and its disks are left intact.
--list Lists all known VM creation jobs, by ID. One job ID is output per line.
--status job-id
Outputs the status of the specified job.
JOB STATES
Every job is always in one of the following states:
0: SETTINGS
1: PREP_INSTALL
2: INSTALL
3: POST_INSTALL
4: RUNTIME_CONF
5: RUNTIME
6: FINISHED
7: FAILED
8: CANCELED
The normal progression is from state 0 to state 6. States 6, 7, and 8 are terminal states.
JOB STATUS
Querying the job status will print (to stdout) a number of key/value pairs. The possible keys and their meanings are:
exit The exit code of the VM creation job. This key is only present once the job is in one of the states FINISHED, FAILED, or CANCELED.
To interpret the meaning of the exit code, see vm-install(8)
id The job ID. Always present.
inotify
A filename to monitor (via inotify(7) ) for state changes. The recommended inotify mask to use is IN_CLOSE_WRITE. Always present.
log The location of the log file. Always present.
pid The process ID of the VM creation job. This key is only present if the VM creation process is still running. The PID is used
internally to cancel the job.
state The job's current state. See JOB STATES. Always present.
uuid The VM's UUID. This key is only present once all of the VM's settings have been gathered.
vnc The last known location to view the VM's console via VNC. Note that the presence of this key does not guarantee that the VM is cur-
rently running. When no authentication is necessary, the URL will be ip::port. If authentication is necessary, the URL will be
username:password@ip::port.
DIAGNOSTICS
A zero exit code indicates success; non-zero indicates failure.
Note that the exit code of this tool indicates the success of the job management command. It does not represent the success or failure of
the job itself.
SEE ALSO
To interpret the exit code of a job or of this command, see vm-install(8)
To monitor state changes of jobs, see inotify(7)
To report problems with this software or its documentation, visit http://bugzilla.novell.com
2007-02-01 vm-install-jobs(8)