10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Bash version 4.4.20 / Ubuntu 16.0.4
Hello,
I tried to write a script that gathers some data and passes them to an executable.
The executed application answers with an error. The echo output in the script returns correct values.
If I copy/paste the last echo command, it get's executed... (2 Replies)
Discussion started by: sushi2k7
2 Replies
2. UNIX for Beginners Questions & Answers
Hi everyone,
I've an issue trying to soustracte two dates, e.g:
d1=$(date -d "Nov 18, 2017" +%s)
d2=$(date +%s) # Today we are 2017-11-16
echo "$(( (d1 - d2) / 86400 ))"
Output:
1
I don't understand why it doesn't work. for me, it should give "18 - 16 = 2".
Much appreciated... (1 Reply)
Discussion started by: Arnaudh78
1 Replies
3. Shell Programming and Scripting
Dear All,
I would like move some directories in another location.
Basically, my ls -lis
drwxr-xr-x 3 XXXXXXXXXXXXXXXXXXXX 4096 Feb 24 02:18 data.N701_N502.ABCDE
-rw-r--r-- 1 XXXXXXXXXXXXXXXXXXXX 185865797 Feb 23 11:27 data.N701_N502.ABCDE_file1
-rw-r--r-- 1 XXXXXXXXXXXXXXXXXXXX... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
4. OS X (Apple)
flamingo:~ joliver$ sudo find / -nogroup
find: /dev/fd/4: No such file or directory
find: /home: No such file or directory
find: /Library: No such file or directory
find: /net: No such file or directory
find: /Network: No such file or directory
find: /private: No such file or directory
find:... (2 Replies)
Discussion started by: jnojr
2 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to write a script that checks gvfs to see if a mount exists so I can run it from network-manager's status hooks. I thought I'd pipe the output of gvfs-mount -l to grep for the particular mounts I care about. When I do this in a bash script:
cmnd="gvfs-mount -l | grep -i... (4 Replies)
Discussion started by: kcstrom
4 Replies
6. Shell Programming and Scripting
I'm trying to write a bash script and call it "compile" such that running it allows me to compile multiple files with the options "-help," "-backup," and "-clean". I've got the code for the options written, i just can't figure out how to read the input string and then translate that into option... (5 Replies)
Discussion started by: travis.batzer
5 Replies
7. Ubuntu
completion-ignore-case option doesn't work in my version:
/home/user $ echo $BASH_VERSION
3.2.48(1)-release
/home/user $ ls -l *
-rw-r--r-- 1 user user 0 2009-10-18 00:09 somefile
-rw-r--r-- 1 user user 0 2009-10-18 00:09 Somefile
/home/user $ set completion-ignore-case on
But when I... (2 Replies)
Discussion started by: Sapfeer
2 Replies
8. Shell Programming and Scripting
I have a script that is working:
#!/bin/bash
sftp user@domain.com <<EOF
cd somedir
mget *.csv
quit
EOF
but on a crontab I want to only pull newer files, so I want to do something like:
while read ls current dir local file != true do
mget that new file
but I'm not sure the syntax... (2 Replies)
Discussion started by: unclecameron
2 Replies
9. Shell Programming and Scripting
Hi everyone,
I have a Linux OS in my PC (older version 9). Its default shell is bash. Whenever I try to run some Perl program it throws error ! eg, if I run this simple PERL program ,
#!/usr/bin/perl
printf "\lHello \n";
$var=3 ;
printf $var;
@list=(1,2,3);
printf "@list";... (6 Replies)
Discussion started by: adc22
6 Replies
10. UNIX for Dummies Questions & Answers
without using ls, just using echo so purely pattern matching
I can say echo */ <-- lists directories
but how would I match files? surely something like *!/ or * but neither work ?
it seems like there isn't much that I can put in but surely i should be able to put any ascii... (1 Reply)
Discussion started by: james hanley
1 Replies