Sponsored Content
Top Forums Shell Programming and Scripting Change file content 4 column to one Column using script Post 302603814 by thepurple on Friday 2nd of March 2012 05:10:32 AM
Old 03-02-2012
Change file content 4 column to one Column using script

Hi Gurus,

I have file content sample:

,5113955056,,TAgent-Suspend
,5119418233,,TAgent-Suspend
,5102119078,,TAgent-Suspend

filenames 120229H5_suspend, 120229H6_unsuspend

I receive those files one of directory /home/temp/

I need following:

HTML Code:
1. Backup first /home/temp/ file to /home/bak

2. File content will be changed to only one column:

5113955056
5119418233
5102119078

3. File *_suspend, *_unsuspend will be transferred to following directories:

/home/suspend/*_suspend
/home/unsuspend/*_unsuspend


4. That Script will put in Crontab for doing the operation 4 times a day. Checking /home/temp file, if present do the above operation.

5. Need a output log of that script: File processed done or No file found.
Need you help to develp the script please.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing one column of delimited file column to fixed width column

Hi, Iam new to unix. I have one input file . Input file : ID1~Name1~Place1 ID2~Name2~Place2 ID3~Name3~Place3 I need output such that only first column should change to fixed width column of 15 characters of length. Output File: ID1<<12 spaces>>Name1~Place1 ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies

2. Shell Programming and Scripting

Change names in a column based on the symbols in another column

If the 4th column has - sign then the names in 3rd column has to change to some user defined names (as shown in output). Thanx input1 1 a aaaaa + 2 b bbbbb + 3 c ccccc + 4 d ddddd + 5 e eeeee + 6 f xxxxx + 8 h hhhhh +... (8 Replies)
Discussion started by: repinementer
8 Replies

3. Shell Programming and Scripting

Need to convert the content of file into COLUMN (To export into excel)

I have multiple condition in file as below. MONITOR "ALERT_INFO" DESCRIPTION "Triggered when informational Netware alert occured" MAXTHRESHOLD 95 SEVERITY Normal MONITOR "ALERT_MAJOR" DESCRIPTION "Triggered when major Netware alert occured" MAXTHRESHOLD SEVERITY Major I need to... (6 Replies)
Discussion started by: velocitnitin
6 Replies

4. Shell Programming and Scripting

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2 file 1 sample SNDK 80004C101 AT XLNX 983919101 BB NETL 64118B100 BS AMD 007903107 CC KLAC 482480100 DC TER 880770102 KATS ATHR 04743P108 KATS... (7 Replies)
Discussion started by: rydz00
7 Replies

5. Shell Programming and Scripting

Help with replace column one content based on reference file

Input file 1 testing 10 20 1 A testing 20 40 1 3 testing 23 232 2 1 testing 10 243 2 . . Reference file 1 final 3 used . . Output file (1 Reply)
Discussion started by: perl_beginner
1 Replies

6. Shell Programming and Scripting

awk or sed: change the color of a column w/o screwing up column spacing

Hey folks. I wrote a little awk script that summarizes /proc/net/dev info and then pipes it to the nix column command to set up column spacing appropriately. Here's some example output: Iface RxMBytes RxPackets RxErrs RxDrop TxMBytes TxPackets TxErrs TxDrop bond0 9 83830... (3 Replies)
Discussion started by: ryran
3 Replies

7. Shell Programming and Scripting

Change column to row base on column 2

Hi Guys, Input.txt L194 A -118.2 L194 B -115.1 L194 C -118.7 L196 A 0 L196 C 0 L197 A -111.2 L197 B -118.9 L197 C -119.9 L199 A -120.4 L199 B -119.9 ... (2 Replies)
Discussion started by: asavaliya
2 Replies

8. Shell Programming and Scripting

Sort a file content using one column

Hello All, I have a file which have content as below. 03/09/2014 10:35 AM 618 Admin\rick pqr_ klm2_pog12_20140309_c.xlsx 03/10/2014 10:35 AM 618 user\test01 mplz_ fgh2_lal12_20140310_c.xlsx 03/17/2014 10:35 AM 618 Admin\vick abc_ xyz2_bc12_20140317_c.xlsx 03/18/2014 ... (2 Replies)
Discussion started by: kumar30213
2 Replies

9. Shell Programming and Scripting

Change data in one column with data from another file's column

Hello, I have this file outputData: # cat /tmp/outputData __Capacity^6^NBSC01_Licences^L3_functionality_for_ESB_switch __Capacity^2100^NBSC01_Licences^Gb_over_IP __Capacity^1837^NBSC01_Licences^EDGE_BSS_Fnc __Capacity^1816^NBSC01_Licences^GPRS_CS3_and_CS4... (1 Reply)
Discussion started by: nypreH
1 Replies

10. UNIX for Beginners Questions & Answers

How to insert data into black column( Secound Column ) in excel (.XLSX) file using shell script?

Source Code of the original script is down below please run the script and try to solve this problem this is my data and I want it column wise 2019-03-20 13:00:00:000 2019-03-20 15:00:00:000 1 Operating System LAB 0 1 1 1 1 1 1 1 1 1 0 1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
condor_suspend(1)					      General Commands Manual						 condor_suspend(1)

Name
       condor_suspend suspend - jobs from the Condor queue

Synopsis
       condor_suspend [-help -version]

       condor_suspend[-debug]  [-pool  centralmanagerhostname[:portnumber]-name  scheddname][-addr  "<a.b.c.d:port>"] cluster cluster.process user
       -constraint expression-all

Description
       condor_suspendsuspends one or more jobs from the Condor job queue. If the -nameoption is specified, the named condor_scheddis targeted  for
       processing.  Otherwise,	the  local  condor_scheddis  targeted. The job(s) to be suspended are identified by one of the job identifiers, as
       described below. For any given job, only the owner of the job or one of the queue super users (defined by the  QUEUE_SUPER_USERS macro) can
       suspend the job.

Options
       -help

	  Display usage information

       -version

	  Display version information

       -pool centralmanagerhostname[:portnumber]

	  Specify a pool by giving the central manager's host name and an optional port number

       -name scheddname

	  Send the command to a machine identified by scheddname

       -addr <a.b.c.d:port>

	  Send the command to a machine located at "<a.b.c.d:port>"

       -debug

	  Causes debugging information to be sent to  stderr , based on the value of the configuration variable  TOOL_DEBUG

       cluster

	  Suspend all jobs in the specified cluster

       cluster.process

	  Suspend the specific job in the cluster

       user

	  Suspend jobs belonging to specified user

       -constraint expression

	  Suspend all jobs which match the job ClassAd expression constraint

       -all

	  Suspend all the jobs in the queue

Exit Status
       condor_suspendwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.

Examples
       To suspend all jobs except for a specific user:

       % condor_suspend  -constraint 'Owner =!= "foo"'

Author
       Condor Team, University of Wisconsin-Madison

Copyright
       Copyright  (C)  1990-2012  Condor  Team,  Computer  Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
       Licensed under the Apache License, Version 2.0.

       See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu

								  September 2012						 condor_suspend(1)
All times are GMT -4. The time now is 05:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy