Sponsored Content
Full Discussion: Replace space within quotes
Top Forums Shell Programming and Scripting Replace space within quotes Post 303007209 by RavinderSingh13 on Tuesday 14th of November 2017 02:03:19 AM
Old 11-14-2017
Hello SkySmart,

Could you please try following and let me know if this helps.(test with only provided sample).
Code:
echo '/var/FTPROOT/px/sci/archive/20171102070057904-DY_DC04_Daily Inventory Sync-en-us.csv' '/var/FTPROOT/px/sci/archive/20171102070058291-DY_DC07_Daily Inventory Sync-en-us.csv' | awk -v RS=" /" -F"/" '{gsub(/ /,"*",$NF);print}' ORS=" /" OFS="/"
OR
echo '/var/FTPROOT/px/sci/archive/20171102070057904-DY_DC04_Daily Inventory Sync-en-us.csv' '/var/FTPROOT/px/sci/archive/20171102070058291-DY_DC07_Daily Inventory Sync-en-us.csv' |
awk -v RS=" /" -F"/" '{gsub(/ /,"*",$NF);print}' ORS=" /" OFS="/"

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux

Replace cloud symbol with single quotes

Dear Experts My source file contains the symbol cloud (☁). How do i replace this ☁ symbol whose Unicode value is 2601 in linux file with single quotes ? Any help will be much appreciated. Many thanks (4 Replies)
Discussion started by: pklcnu
4 Replies

2. Shell Programming and Scripting

sed replace spaces between quotes with a variable

I have lines with: elseif (req.http.host ~ "^(www.)?edificationtube.com$|www.edificationtube.org www.edificationtube.net edificationtube.org www.edificationtube.com edificationtube.net") { elseif (req.http.host ~ "^(www.)?collegecontender.com$|www.collegecontender.com collegecontenders.com... (3 Replies)
Discussion started by: EXT3FSCK
3 Replies

3. UNIX for Dummies Questions & Answers

How to replace double quotes in to ascii value?

Hi, I am getting the data from text file and it contains comma and double quootes. Eg: text file like this: Travelling up Cattai Ridge Rd, going through the "S" bends at the top. Felt a "pull" and pain in groin area, on right side after lifting at work. Repeat "twisting" while working manual... (4 Replies)
Discussion started by: rajesh4851
4 Replies

4. UNIX for Dummies Questions & Answers

Remove two delimiters, space and double quotes

I would like to know how to replace a space delimiter with a ^_ (\037) delimiter and a double quote delimiter while maintaining the spaces inside the double quotes. The double quote delimiter is only used on text fields. I'd prefer a one-liner, but could handle a function or script that accepts... (4 Replies)
Discussion started by: SteveDWin
4 Replies

5. UNIX for Advanced & Expert Users

Replace a value in the file that start with quotes

I have to replace the specific encypted value in the file which is will be a taken as input from user always.PADWD appears two times in the document of which I need to replace the line which start with double quotes. Please help. "PADWD"\1\"LL9@99V@N=3M0O4I4;J43KH6"---Sample line in the file. ... (6 Replies)
Discussion started by: chandu123
6 Replies

6. Shell Programming and Scripting

Search replace strings between single quotes

Hi All, I need to serach and replace a strings between single quote in a file. My file has : location='/data1/test.log' and the output needed is location='/data2/test_dir/test.log' pls if anybody know this can be done in script sed or awk. I have a script, but it's... (6 Replies)
Discussion started by: mnmonu
6 Replies

7. Shell Programming and Scripting

Replace newline character between a double quotes to a space

Hi Guys, I have a file with content as below aj.txt "Iam allfine" abcdef abcd "all is not well" What I'm trying to say is my data has some new line characters in between quoted text. I must get ride of the newline character that comes in between the quoted text. output must be:... (8 Replies)
Discussion started by: ajahuja
8 Replies

8. Shell Programming and Scripting

Replace delimeter between quotes with \| using sed or awk

I've a pipe delimited data in a file of size 3GB. if the text data conatins pipe delimiter that will be enclose with double quotes. I have to replace delimiter which exists between double quotes with #%@#%@#%@ using awk or sed. can some one provide a better and efficient solution to me. The below... (4 Replies)
Discussion started by: BrahmaNaiduA
4 Replies

9. Shell Programming and Scripting

Replace Double quotes within double quotes in a column with space while loading a CSV file

Hi All, I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes. Sample Data : "221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Discussion started by: mlavanya
6 Replies

10. UNIX for Beginners Questions & Answers

Replace newline with comma and append quotes

Hi, I have below requirement. Apple Orange Banana Required O/p in bash 'Apple,Orange,Banana' Can you please help. Please wrap your samples, codes in CODE TAGS as per forum rules. (3 Replies)
Discussion started by: Rtk
3 Replies
genufi(8)						      System Manager's Manual							 genufi(8)

NAME
genufi - Generates a User File Inventory (UFI) file SYNOPSIS
/usr/bin/genufi DESCRIPTION
The genufi utility creates a User File Inventory (UFI) file that contains the names of user files created or copied to your system after an installation. Some of these files reside on file systems that are overwritten during a new installation of the operating system. You must have superuser privileges to run the genufi utility, and you must invoke the genufi utility from the /usr/.smdb. directory. To create the UFI file, the genufi utility checks the Master Synchronization Inventory (MSI) file created by the invsync utility to deter- mine which file systems will be overwritten by a complete installation. The genufi utility searches those file systems for user files and writes these entries to the UFI file. File systems that remain intact during a new installation of the operating system are not searched. The genufi utility also filters out certain files and directories that would not commonly be considered for backup. For example, some log files, installation files, and temporary directories do not need to be restored after a complete installation and are not written to the UFI file. The following directories are not included: /tmp /tmp /usr/.smdb. /usr/sys/HOST /var/adm/smlogs /var/adm/syslog.dated /var/rwho /var/tmp In the previous list, HOST represents the hostname of the system (such as /usr/sys/BLUTO) on the system named bluto. The following files are not included: */core */*.dummy */.new.. /osf_boot */.profile */.proto.. /var/adm/binary.errlog /var/adm/xdm/xdm-pid */vmcore /*vmunix Edit the UFI file to remove the entries for files and directories that you do not want to back up. The UFI file is written in the setld inventory file format. Refer to the stl_inv(4) reference page for more information. RESTRICTIONS
You must have superuser privileges to run the genufi utility. You must invoke the genufi utility from the /usr/.smdb. directory. FILES
Master Synchronization Inventory file User File Inventory file SEE ALSO
ils(8), invsync(8), udelta(8), udetect(8), updmv(8), usync stl_inv(4) genufi(8)
All times are GMT -4. The time now is 07:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy