10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi everyone
I have a problem with my script
If I try directly this command
/usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
It works
But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
2. Shell Programming and Scripting
I have a simple task to replace unix line feed end of line characters with carriage returns.
When I run the following “change file in place” sed instruction from the command line all the Line feeds are successfully replaced with Carriage returns.
sed -i 's/$/\r/' lf_file.txt
But that same... (1 Reply)
Discussion started by: hawkman2k
1 Replies
3. Shell Programming and Scripting
Hi,
When I use the paste command in the terminal window it works fine, but when i try to use it in a bash script file i get errors. I'm not sure how to use the paste command in a bash script file.
my paste command looks like this
paste <( code1 ) <(code2)
thanks (7 Replies)
Discussion started by: eboye
7 Replies
4. Shell Programming and Scripting
Dear all,
I have two files like this
file1
A B
C D
E F
file2
1,2
3,4
5,6
I want this output
output_expected
A B 1,2
C D 3,4
E F 5,6 (3 Replies)
Discussion started by: valente
3 Replies
5. Shell Programming and Scripting
Hello All,
I have tried many permutaion combinations in my shell script but cd command is not working in shell script.
Can any one help me out in this.
Below is my script.
############
#!/bin/sh
set -x on
BASE_DIR=/etc/init.d
export BASE_DIR
cd $BASE_DIR
#############
but its... (8 Replies)
Discussion started by: ajaincv
8 Replies
6. Shell Programming and Scripting
Hello.
I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct.
We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies
7. Shell Programming and Scripting
Hi,
When i run the below command i am able to get the output.
awk '/BEGIN DSSUBRECORD/{c=3;next}c-->0' abc.txt |
awk '/END DSSUBRECORD/{exit}{print}' |
awk '/Owner/{exit}{print}' |
awk '{n2=n1;n1=n;n=$0;if(NR%3==0){printf"%s,%s,%s\n",n2,n1,n}}'
Output:
Name "file_name", ... (5 Replies)
Discussion started by: onesuri
5 Replies
8. Shell Programming and Scripting
Hi
I want to grep for a line and copy and paste that line.
for Example
---- file abc.txt ----
host=atlx1 sid=atld1 mail=abc@abc.com
host=atlx2 sid=atld2 mail=xyz@abc.com
host=atlx3 sid=atld3 mail=def@abc.com
host=atlx4 sid=atld4 mail=mno@abc.com
--- end of file abc.txt ----
Now I... (16 Replies)
Discussion started by: upsrk
16 Replies
9. Shell Programming and Scripting
Hi,
Following is my shell script.
#!/bin/tcsh
view=$1
image=$2
objfld="obj-ppc-$image"
echo $view
echo $image
echo $objfld
echo "cleartool setview $view"
cleartool setview $view;
cd `cd /vob/ios/sys`;
In this "cd" is not working and not getting any error.
my shell is "tcsh"... (3 Replies)
Discussion started by: amitrajvarma
3 Replies
10. Shell Programming and Scripting
I'm attempting to create a Perl script that will:
Take the contents of the usernames.tmp file
(usernames.tmp is created from an awk one-liner ran against /etc/passwd)
Take one line at a time and pass it to the su command as a users name.
This should go on until there is no more name to... (10 Replies)
Discussion started by: bru
10 Replies