Search Results

Search: Posts Made By: crowman
1,090
Posted By crowman
Thanks Sea, I've used .scr short for script...
Thanks Sea,

I've used .scr short for script regardless of the shell. Non programming people run these things sometimes and I've tried to simplify it for them. I'm not actually writing to root, I...
1,090
Posted By crowman
Different output based on run method
Sample Data
#cat /mylist.txt
/raid/job/123
/raid/job/456
/raid/job/789
#

Script
#cat /myfind.scr
#!/bin/bash

touch /nojob.txt
touch /job.txt
unset dirfolder
for dirfolder in `/bin/cat...
871
Posted By crowman
Please delete this then. I'll continue looking...
Please delete this then. I'll continue looking elsewhere.

Thanks
871
Posted By crowman
Pattern list to remove from other file
I have fileA:
Joey.smith /my/path/to/here here
bill@smith /my/path/to/there there
John@smith /my/path/to/anywhere anywhereI have fileB:
bill@smithI want to end with fileC:
Joey.smith...
2,580
Posted By crowman
Using SED to copy/paste with slashes and tabs.
I have:

2012/01_January/Kite[TAB HERE]/foldername/otherfoldername/placeholder[TAB HERE]Blue

I want to end up with:

/foldername/otherfoldername/2012/01_January/Kite/Blue

Basically take...
4,364
Posted By crowman
sed to insert a slash and keep text
I have:
/path/to/my/fixdir/MD1234567.tar

I want to have:
/path/to/my/fixdir/MD/1234567.tar

fixdir never changes but MD does and how many numerical digits does. I want something like:...
1,461
Posted By crowman
Prompt user for info
Please forgive this newbie question. I have a need to create a script that asks a user for information. Something like:

What is the name: $NAME_TYPED_HERE

Is $NAME_TYPED_HERE Correct ? YES (NO...
3,923
Posted By crowman
Bash, Bourne, and nullglob
I have a script that start out with this:
#!/sbin/sh
Several things run.

However I cannot get:
shopt -s nullglob
to run in Bourne. I get:
shopt: not found

So within the main script (after...
10,841
Posted By crowman
sed copy paste
Hello,

I have this path and file:
/dir/dir/dir/dir/dir/dir/dir/dir/dir/THIS_SPOT/fle.txt

I want to end up with:
/dir/dir/dir/dir/dir/dir/dir/dir/dir/THIS_SPOT/fle.txt[tab]THIS_SPOT

Take...
Forum: Solaris 11-16-2009
3,672
Posted By crowman
Sendmail 8.13.8 malformed address
Sending email produces malformed address error. The domain name appears as the active directory name which is not a valid Internet domain thus the malfomred address error.

I have:
divert(0)dnl...
Forum: Solaris 06-18-2009
3,346
Posted By crowman
Problems with 2 NICS and Apache
I have a Solaris 10 box that has 2 Ethernet connections. One is 172.21.0.150, this is on the main internal LAN. The other is 172.16.0.50 this is the DMZ. I have Apache 2.0.59, I do not care which it...
1,627
Posted By crowman
Checking for proper number of files in dir
Using Solaris 10 and sh.

I have three files.
mydirs.txt
/dir1/dir2/dir3
/dir4/dir5/dir6

mydirshave.txt
1
2

mydirsshouldhave.txt
2
2

For each directory listed in mydirs.txt I should...
1,911
Posted By crowman
Wow, you all are amazing. Thanks!
Wow, you all are amazing. Thanks!
1,911
Posted By crowman
swaping sections of lines
Is it possible to do this with sed?

Go from this:
958211 XXYYXXYYXX file1 file2 file3
958897 XXYYXXYYXX file1 file2

To this:
file1 file2 file3 XXYYXXYYXX 958211
file1 file2 XXYYXXYYXX...
12,350
Posted By crowman
Yes Awk did: # /usr/bin/awk '{ gsub...
Yes

Awk did:
# /usr/bin/awk '{ gsub ("XXZZXXZZXX ", "\n") }1' /myfile
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: bailing out near line...
12,350
Posted By crowman
Change that, I am still having issues. I added a...
Change that, I am still having issues. I added a newline in vi when I was testing. The source file has no newline and it seems sed will not even read it. My output from previous post is empty with...
12,350
Posted By crowman
I tried that earlier I get: # /usr/bin/sed...
I tried that earlier I get:
# /usr/bin/sed 's/XXZZXXZZXX /
> /g' /myfile
sed: command garbled: s/XXZZXXZZXX /
#

I am unclear what you meant by the backslash in front, but I just tried some...
12,350
Posted By crowman
insert new line at found chars
Hey gang,

I have:
XXZZXXZZXX 123 asdaffggh dfghyrgr ertyhdhh XXZZXXZZXX 234 sdg XXZZXXZZXX 456 gfg fggfd

That is all on one line. Very simply put I want to do is something like:
sed...
3,660
Posted By crowman
Thanks for your help! Is that something I put...
Thanks for your help! Is that something I put into a script or put into a C program that I can call from the script. Forgive my newbie question.
3,660
Posted By crowman
It is ok if a subdirectory contains multiple pdf...
It is ok if a subdirectory contains multiple pdf files. It only needs to have at least one. If I have NO subdirectory OR any subdirectory withOUT a pdf, that should arrive at the same Z error.
3,660
Posted By crowman
folder existing and file existing
I want to look into a folder to see if there are any folders within it. If there are, I need to check inside each folder to see if it contains a .pdf file

So

If /myserver/myfolder/
contains a...
Showing results 1 to 21 of 21

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