Search Results

Search: Posts Made By: bergerj3
1,586
Posted By bergerj3
Using sed w/variables containing "\"
I'm trying to perform a search and replace on a variable that could potentially contain a \. For example:

#!/bin/ksh

VAR1=$1

VAR2=`printf "$VAR1\n" | sed 's/\\\/--REPLACED--/g'`

The...
5,830
Posted By bergerj3
Checking Return Codes of Background Processes
I'm trying to do the following:
1) Run a bunch of jobs in the background
2) Determine if any one of them returns with a non-zero exit status

Here's what I've come up with so far:...
7,625
Posted By bergerj3
Oldest File In A Directory
I'm writing a script to find the oldest file in a directory. I know this can be done by using ls -rt | tail -1 but these are rather large directories and that can be somewhat slow since the script...
Forum: Filesystems, Disks and Memory 02-05-2002
7,221
Posted By bergerj3
Preserving Ownership w/tar
I'm trying to make a backup of a directory tree on Solaris 8. I'm doing this with my own ID, not root. The problem I am running into is when I extract the archive, all files are owned by me and the...
11,941
Posted By bergerj3
That's exactly what I was looking for. With the...
That's exactly what I was looking for. With the sed example, I found it useful to set a variable to an unprintable character first:

CA=`echo '\001'`

and then use that for my delimiter:
...
11,941
Posted By bergerj3
Garbled Sed w/variables
I'm trying to get a partial file path by passing the part I want removed to sed. Sed gets garbled when I try multiple directories (i.e. because of the extra slash).

For example:...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy