I want to print the columns of a file in unix to a temp file.Below is the code that i have wrote but its not giving proper output.
#!/bin/bash
CURRENT_DATE=`date +'%d%m%Y'`
Temp_Path=/appinfprd/bi/Scripts/IRP/New_Vendors/
IRP_PROJECT/SXM_SFTP/*/INBOUND -type f head -1|xargs -0 ls -al > "$Temp_Path/Column_$CURRENT_DATE.txt"
Solution with find command only
find \
IRP_PROJECT/SXM_SFTP/*/INBOUND \
-type f \
-exec head -1 {} \; \
> "$Temp_Path/Column_$CURRENT_DATE.txt"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.