Sponsored Content
Top Forums Shell Programming and Scripting How to use IFS in this scenario? Post 302458813 by raghunsi on Saturday 2nd of October 2010 01:08:23 AM
Old 10-02-2010
How to use IFS in this scenario?

Given the scenario like this, if at all if have to use IFS on the below given example, how it should be used.

IFS=/

eg:

Code:
 
/xyz/123/348/file1

I want to use the last slash /file1 . So can anyone, suggest me how to pick the last "/" as a IFS.
 

10 More Discussions You Might Find Interesting

1. Ubuntu

ftp gateway scenario

I currently have Win 2003 setup with a server residing in the DMZ as a gateway forwarding ftp traffic via port 44000 to the ftp server behind the firewall. I want to setup the same with RedHat Linux. Need information on what software module would duplicate the above, and pass all ftp/sftp/ssl... (1 Reply)
Discussion started by: cdlvj
1 Replies

2. Shell Programming and Scripting

SFTP scenario

#!/usr/bin/ksh Archive_Dir='/apps/SrcFiles/MTCHG_GFTS/BRGR/Archive' Source_Dir='/apps/SrcFiles/MTCHG_GFTS/BRGR' cd $Source_Dir HOST='xyz.abc.com' USER='abcOUT' PSW='xyzOUT' file="Request*.pgp" for i in 1 2 3 4 5 6 do sftp $USER@$HOST <<END_SCRIPT $PSW bin if ] ; then ... (3 Replies)
Discussion started by: alfredo123
3 Replies

3. Shell Programming and Scripting

How to Script This Scenario

hi all, i have to schedule an email containing the information about some orphan connections existing on the server depending upon the system date. the format of the info to be sent in email is : Process id username servername time when connection... (0 Replies)
Discussion started by: Priyanka S
0 Replies

4. Shell Programming and Scripting

How to implement scenario?

hi, i am having three files which is having following data file1: field1 field2 field3 1 A B 2 C D 3 E F file2: 4 G H 1 I J 5 K L file3: 4 M N (3 Replies)
Discussion started by: angel12345
3 Replies

5. UNIX for Advanced & Expert Users

Is it possible to write script for this scenario??

Hi all, We are hosting Web server using Apache -tomcat , in our company we are following this way for our every new enhancement in production server. for example if the developers move any new code moved to the server means that time we'll do 1.first check the time / date 2. mod_jk... (0 Replies)
Discussion started by: anishkumarv
0 Replies

6. Shell Programming and Scripting

Challenging scenario

Hi, My input file contains 1,2 2,4 3,6 4,9 9,10 My expected output is 1,10 2,10 3,6 4,1 9,10 (6 Replies)
Discussion started by: pandeesh
6 Replies

7. Emergency UNIX and Linux Support

Help in below scenario

Hi, my file has the data like below: 11,231,ABCVAV 22,AAHJHAj22,hdsjkhdls 22,dhskjhdkshd 22,gdgkdkadh 11,232,dgsjgdjh 22,ghdskahdkja 22,shdkajshs 11,233,ddjs 22,dhjkahkd 22,hsajhaah 11,231,sjkjsjj 22,ahkh 22,hsakh From the above i need only the records which starts as 11,231... (5 Replies)
Discussion started by: pandeesh
5 Replies

8. Shell Programming and Scripting

Logic help with Scenario

Hello Folks I am looking for logic help for below scenerio with respect to AIX n unix script 1) We need to get the date of all the saturday in yr 2) L_o left over days is weeks left over days for previous month for eg. first sat of feb is 4th of feb in that week we have 29 - 30 - 31 from Jan... (2 Replies)
Discussion started by: joshiamit
2 Replies

9. Shell Programming and Scripting

FTP failure with different scenario

Hi Gurus the below FTP code works fine, but the issue is from past 1 week couldn't able to send the files to external system. #--------------------------------------------------------------------# #Start the ftp session #--------------------------------------------------------------------#... (3 Replies)
Discussion started by: SeenuGuddu
3 Replies

10. UNIX for Advanced & Expert Users

Sudoers in complex scenario

Hi Unix experts. I got a quite complex sudoers scenario that I want to acheive. Hope someone could help. Here's the setup: 3 linux servers: "server1", "server2" and "server3". 3 users: "user1", "user2" and "user3" 3 services running on 3 servers: "apache", "squid" and "sendmail" Now... (2 Replies)
Discussion started by: cwiggler
2 Replies
XZDIFF(1)							     XZ Utils								 XZDIFF(1)

NAME
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files SYNOPSIS
xzcmp [cmp_options] file1 [file2] xzdiff [diff_options] file1 [file2] lzcmp [cmp_options] file1 [file2] lzdiff [diff_options] file1 [file2] DESCRIPTION
xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed directly to cmp or diff. If only one file is specified, then the files compared are file1 (which must have a suffix of a supported com- pression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they are uncom- pressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp or diff is preserved. The names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils. SEE ALSO
cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1) BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified. Tukaani 2009-07-05 XZDIFF(1)
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy