Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Shell script: Cut / (slash) character in string Post 912 by ThuongTranVN on Friday 26th of January 2001 12:40:18 PM
Old 01-26-2001
Java Shell Script: Cut '\' character in string

I have a string "\/scratch\/databases\". I want
to have a new string "\/scratch\/databases" by cutting last '\' character using shell script. I can't do this
Please help me.
Thanks in advance
ThuongTranVN




[Edited by ThuongTranVN on 01-26-2001 at 01:35 PM]
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cut from a particular character to the end of the string

Hi All, I have a string like "9633C01302_2". I need to extract the number(02) after "13" and before "_" and the number coming after "13" and before "_" is not constant, it keeps on changing... Can some one plz help me wth the command.. i tried this echo "9633C01302_2" | cut -d'_' -f1 ..But... (2 Replies)
Discussion started by: grajesh_955
2 Replies

2. Shell Programming and Scripting

Using sed to append backward slash before forward slash

Hi all, I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
Discussion started by: sarbjit
2 Replies

3. Shell Programming and Scripting

shell script to remove the last character(.) of a string

hi I have a list of words in a text file. these words are appended by "." at their end. They look something like this. word1. word2. word3. word4. word5. I need to remove the last character "." from all the words. The output must look something like this. word1 word2 word3... (7 Replies)
Discussion started by: ss3944
7 Replies

4. Shell Programming and Scripting

Cut out string in bash script

Hi all, I'm trying to extract string from variable in BASH. That's probably trivial for grep but I couldn't figure it out. I want to get name, there's sometimes digit after it, but it should be left out. STRING=http://name5.domain.com:8000/file.dat Could someone help me with that? Any... (10 Replies)
Discussion started by: cootue
10 Replies

5. Shell Programming and Scripting

stdout to file or character device with trailing slash

I have an interesting one for the gurus out there that may have an idea as to why this is happening. We're currently migrating from Solaris 9 to Solaris 10 and we've run into a very strange issue. There are a bunch of shell scripts people have written throughout a directory that are used for... (4 Replies)
Discussion started by: dcarrion87
4 Replies

6. Shell Programming and Scripting

Awk: Searching for length of words between slash character

Dear UNIX Community, I have a set of file paths like the one below: \\folder name \ folder1 \ folder2 \ folder3 \ folder4 \\folder name \ very long folder name \ even longer name I would like to find the length of the characters (including space) between the \'s. However, I want... (6 Replies)
Discussion started by: vnayak
6 Replies

7. Shell Programming and Scripting

Need script to cut string from a filename

Hi, I need a script which do below I have a filename: TEST2013_09_17_XX_XX_XX.csv Now script should create a new file with name: XX_XX_XX.csv Or I should say i need the output as XX_XX_XX.csv Please help. Mant thanks in advance (3 Replies)
Discussion started by: sv0081493
3 Replies

8. UNIX for Dummies Questions & Answers

Inspecting leading char in string for slash

In a SCO Unix shop, I am working on the following script to move any file to its same location on the target machine (called 'othersy' here): pwd=`pwd` for i in "$@" do echo " $i " if ; then echo 1; else echo 0; fi rcp -p $i othersy:$pwd/$i echo "Finished with ^ If I find a file... (4 Replies)
Discussion started by: wbport
4 Replies

9. UNIX for Beginners Questions & Answers

Replace string until 3Rd occurance of forward slash(/)

I have a file abc.txt which has records like 456 /home/fgg/abdc.txt 3567 /home/fdss/vfgb.txt 23 /home/asd/dfght.txt I WANT TO REMOVE STRING UNTIL 3RD OCCURANCE OF FORWARD SLASH Output should be like abdc.txt vfgb.txt dfght.txt (5 Replies)
Discussion started by: himanshupant
5 Replies

10. Shell Programming and Scripting

Cut string from shell

How can I cut the date and leave it in 3 variable? date="20181219" year=substr(date,1,4) monthsubstr(date,4,2) daysubstr(date,6,2) result year=2018 month=12 day=19 this does not work for me (3 Replies)
Discussion started by: tricampeon81
3 Replies
CTL_CYRUSDB(8)						      System Manager's Manual						    CTL_CYRUSDB(8)

 *

NAME
ctl_cyrusdb - perform operations common to all Cyrus databases SYNOPSIS
ctl_cyrusdb [ -C config-file ] -r [ -x ] ctl_cyrusdb [ -C config-file ] -c DESCRIPTION
Ctl_cyrusdb is used to perform various administrative operations on the Cyrus databases. Ctl_cyrusdb reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. The configdirectory option is used to determine the default location of the Cyrus databases. OPTIONS
-C config-file Read configuration options from config-file. -r Recover the databases after an application or system failure. Also performs database cleanup like removing mailbox reservations (and any associated mailbox files). All mailbox files are also checked to make sure the file format matches the configured database type in imapd.conf. If not, the file is automatically converted using the same logic as cvt_cyrusdb. -x Used with -r to recover the database only. (Prevents database cleanup). -c Checkpoint and archive the databases. Changes to the database which are part of committed transactions are written to disk. Also, a hot backup of the databases is made and inactive log files are removed. FILES
/etc/imapd.conf SEE ALSO
imapd.conf(5), cyrmaster(8) CMU
Project Cyrus CTL_CYRUSDB(8)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy