Search Results

Search: Posts Made By: vskr72
1,191
Posted By vskr72
UNIX FTP script help
How do we write a simple FTP script where we write all the commands like open, user, pwd, get, etc written to a command file and then executing the command file with FTP utility? Thank you.

Kumar
2,181
Posted By vskr72
Thank you. it works. But, I am trying to test it...
Thank you. it works. But, I am trying to test it by hard coding a file in /tmp/filelist (replaced $$ with filelist) that doesn't exist. When I run the script at that time it gives an error like this:...
2,181
Posted By vskr72
The way I am looking at it is even if any one of...
The way I am looking at it is even if any one of the copy failed, I want to get notified byt an alert. Is that possible??
2,181
Posted By vskr72
Trapping the return status from FIND command
I have the following code in a script:


find . \( ! -name . -prune \) -name "cg*" -exec cp -p {} "${temp_dir}" \;

ret_stat=$?


I think the return status is only captured for the...
2,898
Posted By vskr72
Thank you all for your inputs/solutions.
Thank you all for your inputs/solutions.
2,898
Posted By vskr72
Yes, I can ensure that the dataand keys are...
Yes, I can ensure that the dataand keys are ordered. That should not be an issue.

Kumar
2,898
Posted By vskr72
Convert rows to columns
hi folks,

I have a sample data like what is shown below:

1,ID=1000
1,Org=CedarparkHospital
1,cn=john
1,sn=doe
1,uid=User001
2,uid=User002
2,ID=2000
2,cn=steve
2,sn=jobs...
17,061
Posted By vskr72
Thank you. Both the solutions work. But I have...
Thank you. Both the solutions work. But I have another question. Why do we have to give the substitution part in the 2nd line. Cant I give the whole command in one line? I tried and it did not work....
17,061
Posted By vskr72
Append variable value with sed
I have a requirement where I need to add a variable value based on a pattern match. When I try this it works:

sed '/IS_ETL_DEV/a\
ABCD' File1.txt > File1.tmp

Now I want to replace IS _ETL_DEV...
1,469
Posted By vskr72
Run a task in a script at a particular time
I have an ETL process that triggers a shell script. This script picks the files created by the ETL process and does an SFTP. These are huge files. Due to infrastructure limitations, we need to...
1,279
Posted By vskr72
Copying files realtime
I have a primary server where certain files are created real time. These files have varying file sizes. I want to FTP or copy them over to a different server server as soon a file gets created. I...
2,651
Posted By vskr72
Reading/Viewing an Unicode file
WE have a file coming from a server that has characters for 4-5 languages. If I download the file to my windows PC and open in Notepad ++, I can clearly see the text in different languages. Notepad++...
1,027
Posted By vskr72
I am getting this error: awk: syntax error...
I am getting this error:

awk: syntax error near line 1
awk: bailing out near line 1


Can you pls help?
1,027
Posted By vskr72
Thank you. I am also seeing if its possible to...
Thank you. I am also seeing if its possible to extend the output like this:

1,user1,1
1,1001,2
1,role1,3

2,user2,1
2,1002,2
2,role1,3
2,role2,4

3,user3,1
3,1003,2
3,role1,3
3,role2,4...
1,297
Posted By vskr72
Thank you guys for the tip. It works.
Thank you guys for the tip. It works.
1,297
Posted By vskr72
Issue with SED command
I have a file that contains lines like this:
allgroups: cn=Role1,cn=groups,o=xyz,st=mn,c=us
allgroups: cn=Role1,cn=groups,o=xyz,st=mn,c=us

I want to remove the string :
...
1,027
Posted By vskr72
Add a Group ID to each row
I have a sample data like this:

user1
1001
role1

user2
1002
role1
role2

user3
1003
role1
role2
role3

And I need to convert it like this:

1,user1
25,300
Posted By vskr72
thank you all for your inputs
thank you all for your inputs
963
Posted By vskr72
Thank you. That was the isssue.
Thank you. That was the isssue.
963
Posted By vskr72
Last line gets deleted
I was using the following option to clean up the ^M characters in a file that was FTPed from Windows:
- dos2unix
- sed 's/^M//g'

The ^M characters are removed but the last line is also getting...
1,383
Posted By vskr72
Read file and send email
I have a file like this. I need to ues this file to send emails to the appropriate ID/group.

For instance in the first line
- Subject should be --> "A1.csv - ABC"
- Body should be --> File...
25,300
Posted By vskr72
do2unix also did not work sometimes. So, we had...
do2unix also did not work sometimes. So, we had to write a custom script.
3,822
Posted By vskr72
Compare files in 2 servers
I need to compare same set of files in 2 different servers and generate a list (in STDOUT) which contain all the files that have changed. I don't have permission to create any temp files or folders...
25,300
Posted By vskr72
Removing special characters - Control M
I have developed a small script to remove the Control M characters that get embedded when we move any file from Windows to Unix. For some reason, its not working in all scenarios. Some times I still...
1,839
Posted By vskr72
Compare the files in 2 different servers for change or modification
I have the following requirement;


I need to compare set of files in 2 different servers A and B.
Both have same sets of files and directory structure
First I need to move the files from...
Showing results 1 to 25 of 41

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